4 #![allow(unused, no_effect)]
6 //#![plugin(regex_macros)]
10 fn fun(x : &mut &mut u32) -> bool { //~ERROR generally you want to avoid `&mut &mut
15 fn less_fun(x : *mut *mut u32) {
19 macro_rules! mut_ptr {
20 ($p:expr) => { &mut $p }
24 #[allow(unused_mut, unused_variables)]
26 let mut x = &mut &mut 1u32; //~ERROR generally you want to avoid `&mut &mut
28 let mut y = &mut x; //~ERROR this expression mutably borrows a mutable reference
32 let y : &mut &mut &mut u32 = &mut &mut &mut 2;
33 //~^ ERROR generally you want to avoid `&mut &mut
34 //~^^ ERROR generally you want to avoid `&mut &mut
35 //~^^^ ERROR generally you want to avoid `&mut &mut
36 //~^^^^ ERROR generally you want to avoid `&mut &mut
40 let mut z = mut_ptr!(&mut 3u32); //~ERROR generally you want to avoid `&mut &mut