1 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
2 --> $DIR/into_iter_on_ref.rs:14:30
4 LL | let _ = (&vec![1, 2, 3]).into_iter();
5 | ^^^^^^^^^ help: call directly: `iter`
7 = note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
9 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
10 --> $DIR/into_iter_on_ref.rs:15:46
12 LL | let _ = vec![1, 2, 3].into_boxed_slice().into_iter();
13 | ^^^^^^^^^ help: call directly: `iter`
15 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
16 --> $DIR/into_iter_on_ref.rs:16:41
18 LL | let _ = std::rc::Rc::from(&[X][..]).into_iter();
19 | ^^^^^^^^^ help: call directly: `iter`
21 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
22 --> $DIR/into_iter_on_ref.rs:17:44
24 LL | let _ = std::sync::Arc::from(&[X][..]).into_iter();
25 | ^^^^^^^^^ help: call directly: `iter`
27 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
28 --> $DIR/into_iter_on_ref.rs:19:32
30 LL | let _ = (&&&&&&&[1, 2, 3]).into_iter();
31 | ^^^^^^^^^ help: call directly: `iter`
33 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
34 --> $DIR/into_iter_on_ref.rs:20:36
36 LL | let _ = (&&&&mut &&&[1, 2, 3]).into_iter();
37 | ^^^^^^^^^ help: call directly: `iter`
39 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `array`
40 --> $DIR/into_iter_on_ref.rs:21:40
42 LL | let _ = (&mut &mut &mut [1, 2, 3]).into_iter();
43 | ^^^^^^^^^ help: call directly: `iter_mut`
45 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Option`
46 --> $DIR/into_iter_on_ref.rs:23:24
48 LL | let _ = (&Some(4)).into_iter();
49 | ^^^^^^^^^ help: call directly: `iter`
51 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Option`
52 --> $DIR/into_iter_on_ref.rs:24:28
54 LL | let _ = (&mut Some(5)).into_iter();
55 | ^^^^^^^^^ help: call directly: `iter_mut`
57 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Result`
58 --> $DIR/into_iter_on_ref.rs:25:32
60 LL | let _ = (&Ok::<_, i32>(6)).into_iter();
61 | ^^^^^^^^^ help: call directly: `iter`
63 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Result`
64 --> $DIR/into_iter_on_ref.rs:26:37
66 LL | let _ = (&mut Err::<i32, _>(7)).into_iter();
67 | ^^^^^^^^^ help: call directly: `iter_mut`
69 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
70 --> $DIR/into_iter_on_ref.rs:27:34
72 LL | let _ = (&Vec::<i32>::new()).into_iter();
73 | ^^^^^^^^^ help: call directly: `iter`
75 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec`
76 --> $DIR/into_iter_on_ref.rs:28:38
78 LL | let _ = (&mut Vec::<i32>::new()).into_iter();
79 | ^^^^^^^^^ help: call directly: `iter_mut`
81 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`
82 --> $DIR/into_iter_on_ref.rs:29:44
84 LL | let _ = (&BTreeMap::<i32, u64>::new()).into_iter();
85 | ^^^^^^^^^ help: call directly: `iter`
87 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `BTreeMap`
88 --> $DIR/into_iter_on_ref.rs:30:48
90 LL | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter();
91 | ^^^^^^^^^ help: call directly: `iter_mut`
93 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`
94 --> $DIR/into_iter_on_ref.rs:31:39
96 LL | let _ = (&VecDeque::<i32>::new()).into_iter();
97 | ^^^^^^^^^ help: call directly: `iter`
99 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `VecDeque`
100 --> $DIR/into_iter_on_ref.rs:32:43
102 LL | let _ = (&mut VecDeque::<i32>::new()).into_iter();
103 | ^^^^^^^^^ help: call directly: `iter_mut`
105 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `LinkedList`
106 --> $DIR/into_iter_on_ref.rs:33:41
108 LL | let _ = (&LinkedList::<i32>::new()).into_iter();
109 | ^^^^^^^^^ help: call directly: `iter`
111 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `LinkedList`
112 --> $DIR/into_iter_on_ref.rs:34:45
114 LL | let _ = (&mut LinkedList::<i32>::new()).into_iter();
115 | ^^^^^^^^^ help: call directly: `iter_mut`
117 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap`
118 --> $DIR/into_iter_on_ref.rs:35:43
120 LL | let _ = (&HashMap::<i32, u64>::new()).into_iter();
121 | ^^^^^^^^^ help: call directly: `iter`
123 error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `HashMap`
124 --> $DIR/into_iter_on_ref.rs:36:47
126 LL | let _ = (&mut HashMap::<i32, u64>::new()).into_iter();
127 | ^^^^^^^^^ help: call directly: `iter_mut`
129 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeSet`
130 --> $DIR/into_iter_on_ref.rs:38:39
132 LL | let _ = (&BTreeSet::<i32>::new()).into_iter();
133 | ^^^^^^^^^ help: call directly: `iter`
135 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BinaryHeap`
136 --> $DIR/into_iter_on_ref.rs:39:41
138 LL | let _ = (&BinaryHeap::<i32>::new()).into_iter();
139 | ^^^^^^^^^ help: call directly: `iter`
141 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet`
142 --> $DIR/into_iter_on_ref.rs:40:38
144 LL | let _ = (&HashSet::<i32>::new()).into_iter();
145 | ^^^^^^^^^ help: call directly: `iter`
147 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Path`
148 --> $DIR/into_iter_on_ref.rs:41:43
150 LL | let _ = std::path::Path::new("12/34").into_iter();
151 | ^^^^^^^^^ help: call directly: `iter`
153 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `PathBuf`
154 --> $DIR/into_iter_on_ref.rs:42:47
156 LL | let _ = std::path::PathBuf::from("12/34").into_iter();
157 | ^^^^^^^^^ help: call directly: `iter`
159 error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
160 --> $DIR/into_iter_on_ref.rs:44:26
162 LL | let _ = (&[1, 2, 3]).into_iter().next();
163 | ^^^^^^^^^ help: call directly: `iter`
165 error: aborting due to 27 previous errors