-
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
manual_map recommends noncompilable code involving ?
#6795
Labels
C-bug
Category: Clippy is not doing the correct thing
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Comments
dtolnay
added
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
labels
Feb 26, 2021
dtolnay
added a commit
to dtolnay/cargo-tally
that referenced
this issue
Feb 26, 2021
dtolnay
added a commit
to dtolnay/cargo-tally
that referenced
this issue
Feb 26, 2021
rust-lang/rust-clippy#6795 error: manual implementation of `Option::map` --> src/tally.rs:410:19 | 410 | let exclude = match args.exclude { | ___________________^ 411 | | Some(ref exclude) => Some(Regex::new(exclude)?), 412 | | None => None, 413 | | }; | |_____^ help: try this: `args.exclude.as_ref().map(|exclude| Regex::new(exclude)?)` | = note: `-D clippy::manual-map` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
dtolnay
added a commit
to dtolnay/syn
that referenced
this issue
Feb 26, 2021
rust-lang/rust-clippy#6795 error: manual implementation of `Option::map` --> src/item.rs:1194:22 | 1194 | let ty = if let Some(eq_token) = input.parse()? { | ______________________^ 1195 | | Some((eq_token, input.parse::<Type>()?)) 1196 | | } else { 1197 | | None 1198 | | }; | |_____________^ help: try this: `input.parse()?.map(|eq_token| (eq_token, input.parse::<Type>()?))` | = note: `-D clippy::manual-map` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
flip1995
added
the
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
label
Feb 26, 2021
bors
added a commit
that referenced
this issue
Feb 26, 2021
Downgrade manual_map to nursery I believe #6795 should be considered a blocker for this lint to be considered for enabling by default. --- changelog: remove manual_map from default list of enabled lints
Thomasdezeeuw
added a commit
to Thomasdezeeuw/heph
that referenced
this issue
Feb 27, 2021
It doesn't work (properly) with the try operator (?), see rust-lang/rust-clippy#6795.
Thomasdezeeuw
added a commit
to Thomasdezeeuw/heph
that referenced
this issue
Feb 27, 2021
It doesn't work (properly) with the try operator (?), see rust-lang/rust-clippy#6795.
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
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Applying the suggestion made by clippy makes the code not compile:
@Jarcho @llogiq
The text was updated successfully, but these errors were encountered: