-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn'tI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
I tried this code (playground):
unsafe fn f() {
None.unwrap_or(String::new().as_mut_vec());
}
fn g() {
None.unwrap_or(unsafe { String::new().as_mut_vec() });
}
I expected to see this happen: Clippy warns on both f
and g
.
Instead, this happened: Clippy only warns on f
.
Meta
cargo clippy -V
: 0.1.51 (2021-02-03 e708cbd)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn'tI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy