11error: a const item should never be interior mutable
2- --> $DIR/non_copy_const.rs:10 :1
2+ --> $DIR/non_copy_const.rs:9 :1
33 |
44LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5); //~ ERROR interior mutable
55 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,23 +9,23 @@ LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5); //~ ERROR interior mutable
99 = note: `#[deny(clippy::declare_interior_mutable_const)]` on by default
1010
1111error: a const item should never be interior mutable
12- --> $DIR/non_copy_const.rs:11 :1
12+ --> $DIR/non_copy_const.rs:10 :1
1313 |
1414LL | const CELL: Cell<usize> = Cell::new(6); //~ ERROR interior mutable
1515 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616 | |
1717 | help: make this a static item: `static`
1818
1919error: a const item should never be interior mutable
20- --> $DIR/non_copy_const.rs:12 :1
20+ --> $DIR/non_copy_const.rs:11 :1
2121 |
2222LL | const ATOMIC_TUPLE: ([AtomicUsize; 1], Vec<AtomicUsize>, u8) = ([ATOMIC], Vec::new(), 7);
2323 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424 | |
2525 | help: make this a static item: `static`
2626
2727error: a const item should never be interior mutable
28- --> $DIR/non_copy_const.rs:17 :9
28+ --> $DIR/non_copy_const.rs:16 :9
2929 |
3030LL | const $name: $ty = $e;
3131 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -34,49 +34,49 @@ LL | declare_const!(_ONCE: Once = Once::new()); //~ ERROR interior mutable
3434 | ------------------------------------------ in this macro invocation
3535
3636error: a const item should never be interior mutable
37- --> $DIR/non_copy_const.rs:41 :5
37+ --> $DIR/non_copy_const.rs:40 :5
3838 |
3939LL | const ATOMIC: AtomicUsize; //~ ERROR interior mutable
4040 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
4141
4242error: a const item should never be interior mutable
43- --> $DIR/non_copy_const.rs:45 :5
43+ --> $DIR/non_copy_const.rs:44 :5
4444 |
4545LL | const INPUT: T;
4646 | ^^^^^^^^^^^^^^^
4747 |
4848help: consider requiring `T` to be `Copy`
49- --> $DIR/non_copy_const.rs:45 :18
49+ --> $DIR/non_copy_const.rs:44 :18
5050 |
5151LL | const INPUT: T;
5252 | ^
5353
5454error: a const item should never be interior mutable
55- --> $DIR/non_copy_const.rs:48 :5
55+ --> $DIR/non_copy_const.rs:47 :5
5656 |
5757LL | const ASSOC: Self::NonCopyType;
5858 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5959 |
6060help: consider requiring `<Self as Trait<T>>::NonCopyType` to be `Copy`
61- --> $DIR/non_copy_const.rs:48 :18
61+ --> $DIR/non_copy_const.rs:47 :18
6262 |
6363LL | const ASSOC: Self::NonCopyType;
6464 | ^^^^^^^^^^^^^^^^^
6565
6666error: a const item should never be interior mutable
67- --> $DIR/non_copy_const.rs:52 :5
67+ --> $DIR/non_copy_const.rs:51 :5
6868 |
6969LL | const AN_INPUT: T = Self::INPUT;
7070 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7171 |
7272help: consider requiring `T` to be `Copy`
73- --> $DIR/non_copy_const.rs:52 :21
73+ --> $DIR/non_copy_const.rs:51 :21
7474 |
7575LL | const AN_INPUT: T = Self::INPUT;
7676 | ^
7777
7878error: a const item should never be interior mutable
79- --> $DIR/non_copy_const.rs:17 :9
79+ --> $DIR/non_copy_const.rs:16 :9
8080 |
8181LL | const $name: $ty = $e;
8282 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -85,49 +85,49 @@ LL | declare_const!(ANOTHER_INPUT: T = Self::INPUT); //~ ERROR interior muta
8585 | ----------------------------------------------- in this macro invocation
8686
8787error: a const item should never be interior mutable
88- --> $DIR/non_copy_const.rs:61 :5
88+ --> $DIR/non_copy_const.rs:60 :5
8989 |
9090LL | const SELF_2: Self;
9191 | ^^^^^^^^^^^^^^^^^^^
9292 |
9393help: consider requiring `Self` to be `Copy`
94- --> $DIR/non_copy_const.rs:61 :19
94+ --> $DIR/non_copy_const.rs:60 :19
9595 |
9696LL | const SELF_2: Self;
9797 | ^^^^
9898
9999error: a const item should never be interior mutable
100- --> $DIR/non_copy_const.rs:82 :5
100+ --> $DIR/non_copy_const.rs:81 :5
101101 |
102102LL | const ASSOC_3: AtomicUsize = AtomicUsize::new(14); //~ ERROR interior mutable
103103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104104
105105error: a const item should never be interior mutable
106- --> $DIR/non_copy_const.rs:85 :5
106+ --> $DIR/non_copy_const.rs:84 :5
107107 |
108108LL | const U_SELF: U = U::SELF_2;
109109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110110 |
111111help: consider requiring `U` to be `Copy`
112- --> $DIR/non_copy_const.rs:85 :19
112+ --> $DIR/non_copy_const.rs:84 :19
113113 |
114114LL | const U_SELF: U = U::SELF_2;
115115 | ^
116116
117117error: a const item should never be interior mutable
118- --> $DIR/non_copy_const.rs:88 :5
118+ --> $DIR/non_copy_const.rs:87 :5
119119 |
120120LL | const T_ASSOC: T::NonCopyType = T::ASSOC;
121121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122122 |
123123help: consider requiring `<T as Trait<u32>>::NonCopyType` to be `Copy`
124- --> $DIR/non_copy_const.rs:88 :20
124+ --> $DIR/non_copy_const.rs:87 :20
125125 |
126126LL | const T_ASSOC: T::NonCopyType = T::ASSOC;
127127 | ^^^^^^^^^^^^^^
128128
129129error: a const item with interior mutability should not be borrowed
130- --> $DIR/non_copy_const.rs:95 :5
130+ --> $DIR/non_copy_const.rs:94 :5
131131 |
132132LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
133133 | ^^^^^^
@@ -136,119 +136,119 @@ LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
136136 = help: assign this const to a local or static variable, and use the variable here
137137
138138error: a const item with interior mutability should not be borrowed
139- --> $DIR/non_copy_const.rs:96 :16
139+ --> $DIR/non_copy_const.rs:95 :16
140140 |
141141LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
142142 | ^^^^^^
143143 |
144144 = help: assign this const to a local or static variable, and use the variable here
145145
146146error: a const item with interior mutability should not be borrowed
147- --> $DIR/non_copy_const.rs:99 :22
147+ --> $DIR/non_copy_const.rs:98 :22
148148 |
149149LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
150150 | ^^^^^^^^^
151151 |
152152 = help: assign this const to a local or static variable, and use the variable here
153153
154154error: a const item with interior mutability should not be borrowed
155- --> $DIR/non_copy_const.rs:100 :25
155+ --> $DIR/non_copy_const.rs:99 :25
156156 |
157157LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
158158 | ^^^^^^^^^
159159 |
160160 = help: assign this const to a local or static variable, and use the variable here
161161
162162error: a const item with interior mutability should not be borrowed
163- --> $DIR/non_copy_const.rs:101 :27
163+ --> $DIR/non_copy_const.rs:100 :27
164164 |
165165LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
166166 | ^^^^^^^^^
167167 |
168168 = help: assign this const to a local or static variable, and use the variable here
169169
170170error: a const item with interior mutability should not be borrowed
171- --> $DIR/non_copy_const.rs:102 :26
171+ --> $DIR/non_copy_const.rs:101 :26
172172 |
173173LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
174174 | ^^^^^^^^^
175175 |
176176 = help: assign this const to a local or static variable, and use the variable here
177177
178178error: a const item with interior mutability should not be borrowed
179- --> $DIR/non_copy_const.rs:113 :14
179+ --> $DIR/non_copy_const.rs:112 :14
180180 |
181181LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
182182 | ^^^^^^^^^^^^
183183 |
184184 = help: assign this const to a local or static variable, and use the variable here
185185
186186error: a const item with interior mutability should not be borrowed
187- --> $DIR/non_copy_const.rs:114 :14
187+ --> $DIR/non_copy_const.rs:113 :14
188188 |
189189LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
190190 | ^^^^^^^^^^^^
191191 |
192192 = help: assign this const to a local or static variable, and use the variable here
193193
194194error: a const item with interior mutability should not be borrowed
195- --> $DIR/non_copy_const.rs:115 :19
195+ --> $DIR/non_copy_const.rs:114 :19
196196 |
197197LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
198198 | ^^^^^^^^^^^^
199199 |
200200 = help: assign this const to a local or static variable, and use the variable here
201201
202202error: a const item with interior mutability should not be borrowed
203- --> $DIR/non_copy_const.rs:116 :14
203+ --> $DIR/non_copy_const.rs:115 :14
204204 |
205205LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
206206 | ^^^^^^^^^^^^
207207 |
208208 = help: assign this const to a local or static variable, and use the variable here
209209
210210error: a const item with interior mutability should not be borrowed
211- --> $DIR/non_copy_const.rs:117 :13
211+ --> $DIR/non_copy_const.rs:116 :13
212212 |
213213LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
214214 | ^^^^^^^^^^^^
215215 |
216216 = help: assign this const to a local or static variable, and use the variable here
217217
218218error: a const item with interior mutability should not be borrowed
219- --> $DIR/non_copy_const.rs:123 :13
219+ --> $DIR/non_copy_const.rs:122 :13
220220 |
221221LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
222222 | ^^^^^^^^^^^^
223223 |
224224 = help: assign this const to a local or static variable, and use the variable here
225225
226226error: a const item with interior mutability should not be borrowed
227- --> $DIR/non_copy_const.rs:128 :5
227+ --> $DIR/non_copy_const.rs:127 :5
228228 |
229229LL | CELL.set(2); //~ ERROR interior mutability
230230 | ^^^^
231231 |
232232 = help: assign this const to a local or static variable, and use the variable here
233233
234234error: a const item with interior mutability should not be borrowed
235- --> $DIR/non_copy_const.rs:129 :16
235+ --> $DIR/non_copy_const.rs:128 :16
236236 |
237237LL | assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
238238 | ^^^^
239239 |
240240 = help: assign this const to a local or static variable, and use the variable here
241241
242242error: a const item with interior mutability should not be borrowed
243- --> $DIR/non_copy_const.rs:142 :5
243+ --> $DIR/non_copy_const.rs:141 :5
244244 |
245245LL | u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
246246 | ^^^^^^^^^^^
247247 |
248248 = help: assign this const to a local or static variable, and use the variable here
249249
250250error: a const item with interior mutability should not be borrowed
251- --> $DIR/non_copy_const.rs:143 :16
251+ --> $DIR/non_copy_const.rs:142 :16
252252 |
253253LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
254254 | ^^^^^^^^^^^
0 commit comments