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