We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52c6c53 commit 58b7dfaCopy full SHA for 58b7dfa
clippy_lints/src/mut_mut.rs
@@ -20,8 +20,21 @@ declare_clippy_lint! {
20
///
21
/// ### Example
22
/// ```no_run
23
- /// # let mut y = 1;
24
- /// let x = &mut &mut y;
+ /// let x = &mut &mut 1;
+ ///
25
+ /// let mut x = &mut 1;
26
+ /// let y = &mut x;
27
28
+ /// fn foo(x: &mut &mut u32) {}
29
+ /// ```
30
+ /// Use instead
31
+ /// ```no_run
32
+ /// let x = &mut 1;
33
34
35
+ /// let y = &mut *x; // reborrow
36
37
+ /// fn foo(x: &mut u32) {}
38
/// ```
39
#[clippy::version = "pre 1.29.0"]
40
pub MUT_MUT,
0 commit comments