1 error: a `const` item should never be interior mutable
4 LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5); //~ ERROR interior mutable
5 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | make this a static item (maybe with lazy_static)
9 = note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
11 error: a `const` item should never be interior mutable
12 --> $DIR/others.rs:10:1
14 LL | const CELL: Cell<usize> = Cell::new(6); //~ ERROR interior mutable
15 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | make this a static item (maybe with lazy_static)
19 error: a `const` item should never be interior mutable
20 --> $DIR/others.rs:11:1
22 LL | const ATOMIC_TUPLE: ([AtomicUsize; 1], Vec<AtomicUsize>, u8) = ([ATOMIC], Vec::new(), 7);
23 | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | make this a static item (maybe with lazy_static)
27 error: a `const` item should never be interior mutable
28 --> $DIR/others.rs:16:9
30 LL | const $name: $ty = $e;
31 | ^^^^^^^^^^^^^^^^^^^^^^
33 LL | declare_const!(_ONCE: Once = Once::new()); //~ ERROR interior mutable
34 | ------------------------------------------ in this macro invocation
36 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
38 error: aborting due to 4 previous errors