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