-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
unnested_or_patterns trigger on master build even if feature is not enabled #5704
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
Comments
dtolnay
added a commit
to serde-rs/serde
that referenced
this issue
Jun 11, 2020
dtolnay
added a commit
to serde-rs/json
that referenced
this issue
Jun 11, 2020
dtolnay
added a commit
to dtolnay/miniserde
that referenced
this issue
Jun 11, 2020
bors
added a commit
that referenced
this issue
Jun 11, 2020
Downgrade unnested_or_patterns to pedantic Even with #5704 fixed, I don't believe it is a safe bet that if someone is using or-patterns anywhere in a codebase then they want to use it as much as possible in the whole codebase. I think it would be reasonable to reevaluate after the feature is stable. I feel that a warn-by-default lint suggesting use of an unstable feature, even if already being used in one place, is questionable. changelog: Remove unnested_or_patterns from default set of enabled lints
bors
added a commit
that referenced
this issue
Jun 11, 2020
Downgrade unnested_or_patterns to pedantic Even with #5704 fixed, I don't believe it is a safe bet that if someone is using or-patterns anywhere in a codebase then they want to use it as much as possible in the whole codebase. I think it would be reasonable to reevaluate after the feature is stable. I feel that a warn-by-default lint suggesting use of an unstable feature, even if already being used in one place, is questionable. changelog: Remove unnested_or_patterns from default set of enabled lints
This was referenced Jun 11, 2020
flip1995
added
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
labels
Jun 12, 2020
I just saw this lint with |
Ran into this with nightly ( warning: unnested or-patterns
--> component_accessors.rs:701:13
|
701 | / (D6Joint::RelativePosition, _)
702 | | | (D6Joint::RelativeRotation, _)
703 | | | (D6Joint::RelativeAngles, _) => {
| |__________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
701 | (D6Joint::RelativePosition | D6Joint::RelativeRotation |
702 | D6Joint::RelativeAngles, _) => { But changing the code to this does indeed fail as it is an experimental feature we do not have enabled: error[E0658]: or-patterns syntax is experimental
--> components/component_accessors.rs:702:17
|
702 | D6Joint::RelativePosition | D6Joint::RelativeRotation | D6Joint::RelativeAngles,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
= help: add `#![feature(or_patterns)]` to the crate attributes to enable |
flip1995
added a commit
to flip1995/rust-clippy
that referenced
this issue
Jun 23, 2020
Downgrade unnested_or_patterns to pedantic Even with rust-lang#5704 fixed, I don't believe it is a safe bet that if someone is using or-patterns anywhere in a codebase then they want to use it as much as possible in the whole codebase. I think it would be reasonable to reevaluate after the feature is stable. I feel that a warn-by-default lint suggesting use of an unstable feature, even if already being used in one place, is questionable. changelog: Remove unnested_or_patterns from default set of enabled lints
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
When using the master toolchain and a clippy built by master, the
unnested_or_patterns
lint triggers on crates although theor_patterns
feature is not enabled in these crates.This does not happen if the nightly-clippy is used.
See #5378 (comment) for details
The text was updated successfully, but these errors were encountered: