2020-01-26 21:14:11 -06:00
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:15:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const ATOMIC: AtomicUsize;
|
2020-01-26 21:14:11 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-23 06:51:04 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:9:9
|
2020-09-24 07:49:22 -05:00
|
|
|
|
|
|
|
|
LL | const $name: $ty = $e;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC);
|
2021-10-14 13:28:30 -05:00
|
|
|
| ---------------------------------------------------------- in this macro invocation
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:43:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const TO_BE_CONCRETE: AtomicUsize = AtomicUsize::new(11);
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:68:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const TO_BE_UNFROZEN: Self::ToBeUnfrozen = AtomicUsize::new(13);
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:69:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const WRAPPED_TO_BE_UNFROZEN: Wrapper<Self::ToBeUnfrozen> = Wrapper(AtomicUsize::new(14));
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:88:5
|
2020-02-06 21:34:06 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const BOUNDED: T::ToBeBounded;
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:116:5
|
2020-09-24 07:49:22 -05:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const SELF: Self = AtomicUsize::new(17);
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:117:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21));
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:125:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const INDIRECT: Cell<*const T>;
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:141:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const ATOMIC: AtomicUsize = AtomicUsize::new(18);
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
error: a `const` item should never be interior mutable
|
2020-11-23 06:51:04 -06:00
|
|
|
--> $DIR/traits.rs:147:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
2023-04-20 10:19:36 -05:00
|
|
|
LL | const BOUNDED_ASSOC_TYPE: T::ToBeBounded = AtomicUsize::new(19);
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-26 21:14:11 -06:00
|
|
|
|
2020-11-23 06:51:04 -06:00
|
|
|
error: aborting due to 11 previous errors
|
2020-01-26 21:14:11 -06:00
|
|
|
|