]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: a `const` item should never be interior mutable |
2 | --> $DIR/traits.rs:15:5 | |
3 | | | |
fe692bf9 | 4 | LL | const ATOMIC: AtomicUsize; |
f20569fa XL |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
6 | | | |
7 | = note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings` | |
8 | ||
9 | error: a `const` item should never be interior mutable | |
10 | --> $DIR/traits.rs:9:9 | |
11 | | | |
12 | LL | const $name: $ty = $e; | |
13 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
14 | ... | |
fe692bf9 | 15 | LL | declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC); |
c295e0f8 | 16 | | ---------------------------------------------------------- in this macro invocation |
f20569fa | 17 | | |
17df50a5 | 18 | = note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info) |
f20569fa XL |
19 | |
20 | error: a `const` item should never be interior mutable | |
21 | --> $DIR/traits.rs:43:5 | |
22 | | | |
fe692bf9 | 23 | LL | const TO_BE_CONCRETE: AtomicUsize = AtomicUsize::new(11); |
f20569fa XL |
24 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
25 | ||
26 | error: a `const` item should never be interior mutable | |
27 | --> $DIR/traits.rs:68:5 | |
28 | | | |
fe692bf9 | 29 | LL | const TO_BE_UNFROZEN: Self::ToBeUnfrozen = AtomicUsize::new(13); |
f20569fa XL |
30 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
31 | ||
32 | error: a `const` item should never be interior mutable | |
33 | --> $DIR/traits.rs:69:5 | |
34 | | | |
fe692bf9 | 35 | LL | const WRAPPED_TO_BE_UNFROZEN: Wrapper<Self::ToBeUnfrozen> = Wrapper(AtomicUsize::new(14)); |
f20569fa XL |
36 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
37 | ||
38 | error: a `const` item should never be interior mutable | |
39 | --> $DIR/traits.rs:88:5 | |
40 | | | |
fe692bf9 | 41 | LL | const BOUNDED: T::ToBeBounded; |
f20569fa XL |
42 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
43 | ||
44 | error: a `const` item should never be interior mutable | |
45 | --> $DIR/traits.rs:116:5 | |
46 | | | |
fe692bf9 | 47 | LL | const SELF: Self = AtomicUsize::new(17); |
f20569fa XL |
48 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
49 | ||
50 | error: a `const` item should never be interior mutable | |
51 | --> $DIR/traits.rs:117:5 | |
52 | | | |
fe692bf9 | 53 | LL | const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21)); |
f20569fa XL |
54 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
55 | ||
56 | error: a `const` item should never be interior mutable | |
57 | --> $DIR/traits.rs:125:5 | |
58 | | | |
fe692bf9 | 59 | LL | const INDIRECT: Cell<*const T>; |
f20569fa XL |
60 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
61 | ||
62 | error: a `const` item should never be interior mutable | |
63 | --> $DIR/traits.rs:141:5 | |
64 | | | |
fe692bf9 | 65 | LL | const ATOMIC: AtomicUsize = AtomicUsize::new(18); |
f20569fa XL |
66 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
67 | ||
68 | error: a `const` item should never be interior mutable | |
69 | --> $DIR/traits.rs:147:5 | |
70 | | | |
fe692bf9 | 71 | LL | const BOUNDED_ASSOC_TYPE: T::ToBeBounded = AtomicUsize::new(19); |
f20569fa XL |
72 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
73 | ||
74 | error: aborting due to 11 previous errors | |
75 |