-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-nurseryLint: Currently in the nursery groupLint: Currently in the nursery group
Description
Code:
pub fn f() {
let v = &mut &mut Vec::<()>::new();
debug_assert!(v.is_empty()); //~ ERROR do not call a function with mutable arguments inside of `debug_assert!`
}Error:
error: do not call a function with mutable arguments inside of `debug_assert!`
--> rust/src/lib.rs:17:19
|
17 | debug_assert!(v.is_empty());
| ^^^^^^^^^^^^
|
= note: `#[deny(clippy::debug_assert_with_mut_call)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#debug_assert_with_mut_call
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-nurseryLint: Currently in the nursery groupLint: Currently in the nursery group