about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/lints.rs
AgeCommit message (Collapse)AuthorLines
2024-01-06Reuse `ctor_sub_tys` when we have one aroundNadrieril-1/+2
2024-01-06Auto merge of #119329 - Nadrieril:reveal-opaques-early, r=compiler-errorsbors-15/+8
Exhaustiveness: Statically enforce revealing of opaques In https://github.com/rust-lang/rust/pull/116821 it was decided that exhaustiveness should operate on the hidden type of an opaque type when relevant. This PR makes sure we consistently reveal opaques within exhaustiveness. This makes it possible to remove `reveal_opaque_ty` from the `TypeCx` trait which was an unfortunate implementation detail. r? `@compiler-errors`
2024-01-03Rename some `Diagnostic` setters.Nicholas Nethercote-1/+1
`Diagnostic` has 40 methods that return `&mut Self` and could be considered setters. Four of them have a `set_` prefix. This doesn't seem necessary for a type that implements the builder pattern. This commit removes the `set_` prefixes on those four methods.
2024-01-01Statically enforce revealing of opaquesNadrieril-15/+8
2023-12-26Keep reference to the original `Pat` in `DeconstructedPat`Nadrieril-2/+2
2023-12-26Rollup merge of #119307 - compiler-errors:pat-lifetimes, r=NadrierilMichael Goulet-10/+10
Clean up some lifetimes in `rustc_pattern_analysis` This PR removes some redundant lifetimes. I figured out that we were shortening the lifetime of an arena-allocated `&'p DeconstructedPat<'p>` to `'a DeconstructedPat<'p>`, which forced us to carry both lifetimes when we could otherwise carry just one. This PR also removes and elides some unnecessary lifetimes. I also cherry-picked 0292eb9bb9b897f5c0926c6a8530877f67e7cc9b, and then simplified more lifetimes in `MatchVisitor`, which should make #119233 a very simple PR! r? Nadrieril
2023-12-26Elide more lifetimesMichael Goulet-1/+1
2023-12-26Yeet some lifetimesMichael Goulet-10/+10
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-23Clarify the situation with dummy patterns and `PatData`Nadrieril-2/+2
Use an explicit `Option` instead of requiring a `Default` bound
2023-12-20Reveal opaque types in exhaustiveness checkingNadrieril-15/+7
2023-12-15s/MatchCx/TypeCx/Nadrieril-1/+1
2023-12-15Introduce `MatchCtxt`Nadrieril-29/+27
2023-12-15s/PatCtxt/PlaceCtxt/Nadrieril-5/+5
2023-12-15`pattern_analysis` doesn't need to know what spans areNadrieril-2/+2
2023-12-15Address review commentsNadrieril-6/+3
2023-12-15s/RustcCtxt/RustcMatchCheckCtxt/Nadrieril-6/+7
2023-12-15Iron out last rustc-specific detailsNadrieril-1/+1
2023-12-15Name rustc-specific things "rustc"Nadrieril-9/+8
2023-12-15Abstract `MatchCheckCtxt` into a traitNadrieril-12/+13
2023-12-15Disentangle the arena from `MatchCheckCtxt`Nadrieril-18/+29
2023-12-15Remove all matching on `ty.kind()` outside `cx`Nadrieril-3/+2
2023-12-11Fix doc linksNadrieril-5/+4
2023-12-11Move lints to their own moduleNadrieril-0/+291