]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / declare_interior_mutable_const / traits.stderr
CommitLineData
f20569fa
XL
1error: a `const` item should never be interior mutable
2 --> $DIR/traits.rs:15:5
3 |
4LL | const ATOMIC: AtomicUsize; //~ ERROR interior mutable
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
8
9error: a `const` item should never be interior mutable
10 --> $DIR/traits.rs:9:9
11 |
12LL | const $name: $ty = $e;
13 | ^^^^^^^^^^^^^^^^^^^^^^
14...
15LL | 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
20error: a `const` item should never be interior mutable
21 --> $DIR/traits.rs:43:5
22 |
23LL | const TO_BE_CONCRETE: AtomicUsize = AtomicUsize::new(11); //~ ERROR interior mutable
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25
26error: a `const` item should never be interior mutable
27 --> $DIR/traits.rs:68:5
28 |
29LL | const TO_BE_UNFROZEN: Self::ToBeUnfrozen = AtomicUsize::new(13); //~ ERROR interior mutable
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32error: a `const` item should never be interior mutable
33 --> $DIR/traits.rs:69:5
34 |
35LL | const WRAPPED_TO_BE_UNFROZEN: Wrapper<Self::ToBeUnfrozen> = Wrapper(AtomicUsize::new(14)); //~ ERROR interior mutable
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38error: a `const` item should never be interior mutable
39 --> $DIR/traits.rs:88:5
40 |
41LL | const BOUNDED: T::ToBeBounded; //~ ERROR interior mutable
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
44error: a `const` item should never be interior mutable
45 --> $DIR/traits.rs:116:5
46 |
47LL | const SELF: Self = AtomicUsize::new(17); //~ ERROR interior mutable
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
50error: a `const` item should never be interior mutable
51 --> $DIR/traits.rs:117:5
52 |
53LL | const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21)); //~ ERROR interior mutable
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56error: a `const` item should never be interior mutable
57 --> $DIR/traits.rs:125:5
58 |
59LL | const INDIRECT: Cell<*const T>; //~ ERROR interior mutable
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
62error: a `const` item should never be interior mutable
63 --> $DIR/traits.rs:141:5
64 |
65LL | const ATOMIC: AtomicUsize = AtomicUsize::new(18); //~ ERROR interior mutable
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
68error: a `const` item should never be interior mutable
69 --> $DIR/traits.rs:147:5
70 |
71LL | const BOUNDED_ASSOC_TYPE: T::ToBeBounded = AtomicUsize::new(19); //~ ERROR interior mutable
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74error: aborting due to 11 previous errors
75