Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for const_patterns_without_partial_eq lint #116122

Closed
RalfJung opened this issue Sep 24, 2023 · 0 comments · Fixed by #120805
Closed

Tracking issue for const_patterns_without_partial_eq lint #116122

RalfJung opened this issue Sep 24, 2023 · 0 comments · Fixed by #120805
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC

Comments

@RalfJung
Copy link
Member

We used to (accidentally) accept some constants in patterns that don't even implement PartialEq. This is an accident and we'd like to hard-reject all such cases in the future. This lint catches those cases.

Relevant PRs:

@RalfJung RalfJung added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Sep 24, 2023
@RalfJung RalfJung changed the title Tracking issue for match_without_partial_eq lint Tracking issue for const_patterns_without_partial_eq lint Sep 25, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 8, 2024
make non-PartialEq-typed consts as patterns a hard error

This lint was introduced in rust-lang#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, rust-lang#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 rust-lang#120362.
@bors bors closed this as completed in c99902e Feb 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 25, 2024
Rollup merge of rust-lang#120805 - RalfJung:const-pat-partial-eq, r=oli-obk

make non-PartialEq-typed consts as patterns a hard error

This lint was introduced in rust-lang#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, rust-lang#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 rust-lang#120362.
Closes rust-lang#116122.
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Feb 26, 2024
make non-PartialEq-typed consts as patterns a hard error

This lint was introduced in rust-lang/rust#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, rust-lang/rust#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 rust-lang/rust#120362.
Closes rust-lang/rust#116122.
alepez added a commit to bluewind-embedded-systems/bw-r-drivers-tc37x that referenced this issue Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant