1
1
error: a `const` item should not be interior mutable
2
- --> tests/ui/declare_interior_mutable_const/others.rs:9 :1
2
+ --> tests/ui/declare_interior_mutable_const/others.rs:10 :1
3
3
|
4
4
LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5);
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,23 +9,23 @@ LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5);
9
9
= help: to override `-D warnings` add `#[allow(clippy::declare_interior_mutable_const)]`
10
10
11
11
error: a `const` item should not be interior mutable
12
- --> tests/ui/declare_interior_mutable_const/others.rs:10 :1
12
+ --> tests/ui/declare_interior_mutable_const/others.rs:11 :1
13
13
|
14
14
LL | const CELL: Cell<usize> = Cell::new(6);
15
15
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
16
|
17
17
= help: consider making this `Sync` so that it can go in a static item or using a `thread_local`
18
18
19
19
error: a `const` item should not be interior mutable
20
- --> tests/ui/declare_interior_mutable_const/others.rs:11 :1
20
+ --> tests/ui/declare_interior_mutable_const/others.rs:12 :1
21
21
|
22
22
LL | const ATOMIC_TUPLE: ([AtomicUsize; 1], Vec<AtomicUsize>, u8) = ([ATOMIC], Vec::new(), 7);
23
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
24
|
25
25
= help: consider making this a static item
26
26
27
27
error: a `const` item should not be interior mutable
28
- --> tests/ui/declare_interior_mutable_const/others.rs:16 :9
28
+ --> tests/ui/declare_interior_mutable_const/others.rs:17 :9
29
29
|
30
30
LL | const $name: $ty = $e;
31
31
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -36,7 +36,7 @@ LL | declare_const!(_ONCE: Once = Once::new());
36
36
= note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
37
37
38
38
error: a `const` item should not be interior mutable
39
- --> tests/ui/declare_interior_mutable_const/others.rs:44 :13
39
+ --> tests/ui/declare_interior_mutable_const/others.rs:45 :13
40
40
|
41
41
LL | const _BAZ: Cell<usize> = Cell::new(0);
42
42
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments