4 #![allow(unused, no_effect, unnecessary_operation)]
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 }
21 //~^ ERROR generally you want to avoid `&mut &mut
25 #[allow(unused_mut, unused_variables)]
27 let mut x = &mut &mut 1u32; //~ERROR generally you want to avoid `&mut &mut
29 let mut y = &mut x; //~ERROR this expression mutably borrows a mutable reference
33 let y : &mut &mut &mut u32 = &mut &mut &mut 2;
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
37 //~| ERROR generally you want to avoid `&mut &mut
41 let mut z = mut_ptr!(&mut 3u32);
42 //~^ NOTE in this expansion of mut_ptr!