-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
warning: called `map(f)` on an Option value where `f` is a unit function
--> src/bin/rcc.rs:124:9
|
124 | unsafe { rccjit.run_main() }.map(std::process::exit);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try this: `if let Some(_) = unsafe { rccjit.run_main() } { std::process::exit(_) }`
This suggestion makes no sense: you can't pass _
to a function. Furthermore, exit()
is not a unit function, it takes i32
.
cargo clippy -V
: clippy 0.0.212 (e8642c7 2020-01-06)
(but also happens in stable)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy