You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #120805 - RalfJung:const-pat-partial-eq, r=<try>
make non-PartialEq-typed consts as patterns a hard error
This lint was introduced in #115893, for Rust 1.74, so we just had the third stable release where this is shown as a future-compat lint (which is shown for dependencies). Not a single comment or backreference showed up in the tracking issue, #116122. So this seems fairly safe to turn into a hard error.
Of course we should do a crater run first.
This is part of #120362.
<https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information",
527
527
);
528
+
store.register_removed(
529
+
"const_patterns_without_partial_eq",
530
+
"converted into hard error, see RFC #3535 \
531
+
<https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information",
warning: to use a constant of type `&[O<B>]` in a pattern, the type must implement `PartialEq`
2
-
--> $DIR/issue-65466.rs:18:9
1
+
error: to use a constant of type `&[O<B>]` in a pattern, the type must implement `PartialEq`
2
+
--> $DIR/issue-65466.rs:14:9
3
3
|
4
4
LL | C => (),
5
5
| ^
6
-
|
7
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
-
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
9
-
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
warning: to use a constant of type `&[O<B>]` in a pattern, the type must implement `PartialEq`
15
-
--> $DIR/issue-65466.rs:18:9
16
-
|
17
-
LL | C => (),
18
-
| ^
19
-
|
20
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21
-
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
22
-
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
warning: to use a constant of type `EnumSet<Enum8>` in a pattern, the type must implement `PartialEq`
2
-
--> $DIR/issue-72896-non-partial-eq-const.rs:20:9
1
+
error: to use a constant of type `EnumSet<Enum8>` in a pattern, the type must implement `PartialEq`
2
+
--> $DIR/issue-72896-non-partial-eq-const.rs:19:9
3
3
|
4
4
LL | CONST_SET => { /* ok */ }
5
5
| ^^^^^^^^^
6
-
|
7
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
-
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
9
-
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
warning: to use a constant of type `EnumSet<Enum8>` in a pattern, the type must implement `PartialEq`
15
-
--> $DIR/issue-72896-non-partial-eq-const.rs:20:9
16
-
|
17
-
LL | CONST_SET => { /* ok */ }
18
-
| ^^^^^^^^^
19
-
|
20
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21
-
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
22
-
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
0 commit comments