1
Fork 0

Rollup merge of #120423 - RalfJung:indirect-structural-match, r=petrochenkov

update indirect structural match lints to match RFC and to show up for dependencies

This is a large step towards implementing https://github.com/rust-lang/rfcs/pull/3535.
We currently have five lints related to "the structural match situation":
- nontrivial_structural_match
- indirect_structural_match
- pointer_structural_match
- const_patterns_without_partial_eq
- illegal_floating_point_literal_pattern

This PR concerns the first 3 of them. (The 4th already is set up to show for dependencies, and the 5th is removed by https://github.com/rust-lang/rust/pull/116284.) nontrivial_structural_match is being removed as per the RFC; the other two are enabled to show up in dependencies.

Fixes https://github.com/rust-lang/rust/issues/73448 by removing the affected analysis.
This commit is contained in:
Matthias Krüger 2024-02-06 22:45:41 +01:00 committed by GitHub
commit 176c4ba5c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 587 additions and 368 deletions

View file

@ -520,6 +520,11 @@ fn register_builtins(store: &mut LintStore) {
"illegal_floating_point_literal_pattern",
"no longer a warning, float patterns behave the same as `==`",
);
store.register_removed(
"nontrivial_structural_match",
"no longer needed, see RFC #3535 \
<https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information",
);
}
fn register_internals(store: &mut LintStore) {