about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/declare_interior_mutable_const.stderr
blob: 9742c17486c5ffb6e742583531ed7f48ff3f2f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:12:7
   |
LL | const UNSAFE_CELL: UnsafeCell<u32> = UnsafeCell::new(0);
   |       ^^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item
note: the lint level is defined here
  --> tests/ui/declare_interior_mutable_const.rs:1:9
   |
LL | #![deny(clippy::declare_interior_mutable_const)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:13:7
   |
LL | const REF_CELL: RefCell<u32> = RefCell::new(0);
   |       ^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:14:7
   |
LL | const CELL: Cell<u32> = Cell::new(0);
   |       ^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:28:7
   |
LL | const CELL_TUPLE: (bool, Cell<u32>) = (true, Cell::new(0));
   |       ^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:29:7
   |
LL | const CELL_ARRAY: [Cell<u32>; 2] = [Cell::new(0), Cell::new(0)];
   |       ^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:38:7
   |
LL | const CELL_STRUCT: CellStruct = CellStruct {
   |       ^^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:46:7
   |
LL | const CELL_ENUM: CellEnum = CellEnum::Cell(Cell::new(0));
   |       ^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:49:7
   |
LL | const SOME_CELL: Option<Cell<u32>> = Some(Cell::new(0));
   |       ^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:53:7
   |
LL | const SOME_NESTED_CELL: NestedCell = NestedCell([(Some(Cell::new(0)),)]);
   |       ^^^^^^^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:60:7
   |
LL | const UNION_CELL: UnionCell = UnionCell {
   |       ^^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:64:7
   |
LL | const UNION_U32: UnionCell = UnionCell { x: 0 };
   |       ^^^^^^^^^
   |
   = help: did you mean to make this a `thread_local!` item

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:69:11
   |
LL |     const CELL: Cell<u32> = Cell::new(0);
   |           ^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:74:11
   |
LL |     const SELF: Self = Self(Cell::new(0));
   |           ^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:76:11
   |
LL |     const SOME_SELF: Option<Self> = Some(Self(Cell::new(0)));
   |           ^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:92:11
   |
LL |     const DEFAULT: Self = Some(Cell::new(T::DEFAULT));
   |           ^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:100:11
   |
LL |     const DEFAULT: Self = Self::Cell(Cell::new(T::DEFAULT));
   |           ^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:103:11
   |
LL |     const CELL: Self = Self::DEFAULT;
   |           ^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:104:11
   |
LL |     const CELL_BY_DEFAULT: Self = Self::Cell(Cell::DEFAULT);
   |           ^^^^^^^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:116:11
   |
LL |     const GENERIC_CELL: Self = Self::GenericEnumCell(GenericEnumCell::<T>::CELL);
   |           ^^^^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:118:11
   |
LL |     const ENUM_CELL: Self = Self::EnumCell(GenericEnumCell::<u32>::CELL);
   |           ^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:123:11
   |
LL |     const CELL: Cell<Self>;
   |           ^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:127:11
   |
LL |     const SOME_CELL: Option<Cell<Self>> = Some(Cell::new(Self::DEFAULT));
   |           ^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:136:11
   |
LL |     const CELL: Cell<Self::T>;
   |           ^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:140:11
   |
LL |     const SOME_CELL: Option<Cell<Self::T>> = Some(Cell::new(Self::DEFAULT));
   |           ^^^^^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:160:11
   |
LL |     const VALUE: Self::T = Cell::new(0);
   |           ^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:171:11
   |
LL |     const VALUE: <Self::T as WithAssoc>::T = Cell::new(0);
   |           ^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:181:11
   |
LL |     const VALUE: Self::T<u32> = Cell::new(0);
   |           ^^^^^

error: named constant with interior mutability
  --> tests/ui/declare_interior_mutable_const.rs:196:11
   |
LL |     const VALUE: Self::T<Cell<u32>> = Some(Cell::new(0));
   |           ^^^^^

error: aborting due to 28 previous errors