Matthias Krüger
a1ecced532
Rollup merge of #120318 - Nadrieril:share-debug-impl, r=compiler-errors
...
pattern_analysis: Reuse most of the `DeconstructedPat` `Debug` impl
The `DeconstructedPat: Debug` is best-effort because we'd need `tcx` to get things like field names etc. Since rust-analyzer has a similar constraint, this PR moves most the impl to be shared between the two. While I was at it I also fixed a nit in the `IntRange: Debug` impl.
r? `@compiler-errors`
2024-01-25 08:39:45 +01:00
Nadrieril
95a14d43d7
Implement feature gate logic
2024-01-25 00:12:32 +01:00
Nadrieril
bdab213993
Most of the DeconstructedPat Debug impl is reusable
2024-01-24 20:04:33 +01:00
Nadrieril
e088016f9d
Let ctor_sub_tys return any Iterator they want
...
Since we always clone and allocate the types somewhere else ourselves,
no need to ask for `Cx` to do the allocation.
2024-01-24 16:55:26 +01:00
Nicholas Nethercote
e164cf30f8
Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint.
2024-01-23 08:09:05 +11:00
Nadrieril
796cdc590c
Remove Ty: Copy bound
2024-01-20 15:22:14 +01:00
Nadrieril
448c4a4efb
Remove the unused overlapping_range_endpoints Vec
2024-01-15 19:27:06 +01:00
Nadrieril
8b66f497eb
Lint overlapping ranges directly from exhaustiveness
2024-01-15 19:27:06 +01:00
Nadrieril
db36304102
rustc_pattern_analysis no longer needs to be passed an arena
2024-01-12 18:55:27 +01:00
Nadrieril
6f6ba2571d
Factor out collection of overlapping ranges
2024-01-11 13:59:41 +01:00
Nadrieril
4b2e8bc841
Abort analysis on type error
2024-01-07 22:13:08 +01:00
Nadrieril
07d5f19426
Add an error path to the algorithm
2024-01-07 22:13:08 +01:00
Nadrieril
c35272058d
Statically enforce revealing of opaques
2024-01-01 23:10:03 +01:00
Michael Goulet
fcb42b42d6
Remove movability from TyKind::Coroutine
2023-12-28 16:35:01 +00:00
Nadrieril
fc0be3c921
Keep reference to the original Pat in DeconstructedPat
2023-12-26 23:14:23 +01:00
Michael Goulet
48d089a800
Merge 'thir and 'p
2023-12-26 03:15:41 +00:00
Michael Goulet
ae40f6a7ff
Clean up more lifetimes
2023-12-26 02:06:39 +00:00
Michael Goulet
b91a98ba10
Even more
2023-12-26 02:02:01 +00:00
Nadrieril
34307ab7c5
Reveal empty opaques in depth
2023-12-23 14:59:12 +01:00
Nadrieril
5fccaee59c
Clarify the situation with dummy patterns and PatData
...
Use an explicit `Option` instead of requiring a `Default` bound
2023-12-23 00:08:38 +01:00
Nadrieril
2a87bae48d
Reveal opaque types in exhaustiveness checking
2023-12-20 14:43:00 +01:00
Nadrieril
3016c29628
s/MatchCx/TypeCx/
2023-12-15 17:26:19 +01:00
Nadrieril
4bcf66f875
Introduce MatchCtxt
2023-12-15 16:58:38 +01:00
Nadrieril
60ea14bfaa
s/PatCtxt/PlaceCtxt/
2023-12-15 16:58:38 +01:00
Nadrieril
1e89a38423
pattern_analysis doesn't need to know what spans are
2023-12-15 16:58:38 +01:00
Nadrieril
e10b165775
s/RustcCtxt/RustcMatchCheckCtxt/
2023-12-15 16:58:38 +01:00
Nadrieril
42f4393824
Iron out last rustc-specific details
2023-12-15 16:58:37 +01:00
Nadrieril
cb622f3994
Name rustc-specific things "rustc"
2023-12-15 16:58:37 +01:00