1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]
11 #![warn(clippy::mut_mut)]
13 fn fun(x: &mut &mut u32) -> bool {
17 fn less_fun(x: *mut *mut u32) {
21 macro_rules! mut_ptr {
27 #[allow(unused_mut, unused_variables)]
29 let mut x = &mut &mut 1u32;
35 let y: &mut &mut u32 = &mut &mut 2;
40 let y: &mut &mut &mut u32 = &mut &mut &mut 2;
44 let mut z = mut_ptr!(&mut 3u32);
48 let array = [5, 6, 7, 8, 9];
49 let mut args = array.iter().skip(2);
50 for &arg in &mut args {