2020-11-23 12:51:04 +00:00
|
|
|
error: a `const` item should never be interior mutable
|
|
|
|
--> $DIR/others.rs:9:1
|
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | const ATOMIC: AtomicUsize = AtomicUsize::new(5);
|
2020-11-23 12:51:04 +00:00
|
|
|
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| make this a static item (maybe with lazy_static)
|
|
|
|
|
|
|
|
|
= note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
|
|
|
--> $DIR/others.rs:10:1
|
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | const CELL: Cell<usize> = Cell::new(6);
|
2020-11-23 12:51:04 +00:00
|
|
|
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| make this a static item (maybe with lazy_static)
|
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
|
|
|
--> $DIR/others.rs:11:1
|
|
|
|
|
|
|
|
|
LL | const ATOMIC_TUPLE: ([AtomicUsize; 1], Vec<AtomicUsize>, u8) = ([ATOMIC], Vec::new(), 7);
|
|
|
|
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| make this a static item (maybe with lazy_static)
|
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
|
|
|
--> $DIR/others.rs:16:9
|
|
|
|
|
|
|
|
|
LL | const $name: $ty = $e;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | declare_const!(_ONCE: Once = Once::new());
|
2021-10-14 18:28:30 +00:00
|
|
|
| ----------------------------------------- in this macro invocation
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-11-23 12:51:04 +00:00
|
|
|
|
2022-07-25 12:41:12 +00:00
|
|
|
error: a `const` item should never be interior mutable
|
2022-07-25 14:04:18 +00:00
|
|
|
--> $DIR/others.rs:43:13
|
2022-07-25 12:41:12 +00:00
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | const _BAZ: Cell<usize> = Cell::new(0);
|
2022-07-25 12:41:12 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | issue_8493!();
|
|
|
|
| ------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `issue_8493` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2020-11-23 12:51:04 +00:00
|
|
|
|