1
1
error: a `const` item with interior mutability should not be borrowed
2
- --> tests/ui/borrow_interior_mutable_const/traits.rs:15 :18
2
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:29 :18
3
3
|
4
4
LL | let _ = &Self::ATOMIC;
5
5
| ^^^^^^^^^^^^
@@ -12,132 +12,84 @@ LL | #![deny(clippy::borrow_interior_mutable_const)]
12
12
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
13
14
14
error: a `const` item with interior mutability should not be borrowed
15
- --> tests/ui/borrow_interior_mutable_const/traits.rs:27:18
16
- |
17
- LL | let _ = &Self::ATOMIC;
18
- | ^^^^^^^^^^^^
19
- |
20
- = help: assign this const to a local or static variable, and use the variable here
21
-
22
- error: a `const` item with interior mutability should not be borrowed
23
- --> tests/ui/borrow_interior_mutable_const/traits.rs:53:18
15
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:55:18
24
16
|
25
17
LL | let _ = &Self::TO_BE_CONCRETE;
26
18
| ^^^^^^^^^^^^^^^^^^^^
27
19
|
28
20
= help: assign this const to a local or static variable, and use the variable here
29
21
30
22
error: a `const` item with interior mutability should not be borrowed
31
- --> tests/ui/borrow_interior_mutable_const/traits.rs:89 :18
23
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:91 :18
32
24
|
33
25
LL | let _ = &Self::TO_BE_UNFROZEN;
34
26
| ^^^^^^^^^^^^^^^^^^^^
35
27
|
36
28
= help: assign this const to a local or static variable, and use the variable here
37
29
38
30
error: a `const` item with interior mutability should not be borrowed
39
- --> tests/ui/borrow_interior_mutable_const/traits.rs:91 :18
31
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:93 :18
40
32
|
41
33
LL | let _ = &Self::WRAPPED_TO_BE_UNFROZEN;
42
34
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
35
|
44
36
= help: assign this const to a local or static variable, and use the variable here
45
37
46
38
error: a `const` item with interior mutability should not be borrowed
47
- --> tests/ui/borrow_interior_mutable_const/traits.rs:114 :18
39
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:129 :18
48
40
|
49
41
LL | let _ = &Self::BOUNDED;
50
42
| ^^^^^^^^^^^^^
51
43
|
52
44
= help: assign this const to a local or static variable, and use the variable here
53
45
54
46
error: a `const` item with interior mutability should not be borrowed
55
- --> tests/ui/borrow_interior_mutable_const/traits.rs:128:18
56
- |
57
- LL | let _ = &Self::BOUNDED;
58
- | ^^^^^^^^^^^^^
59
- |
60
- = help: assign this const to a local or static variable, and use the variable here
61
-
62
- error: a `const` item with interior mutability should not be borrowed
63
- --> tests/ui/borrow_interior_mutable_const/traits.rs:158:18
47
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:159:18
64
48
|
65
49
LL | let _ = &Self::SELF;
66
50
| ^^^^^^^^^^
67
51
|
68
52
= help: assign this const to a local or static variable, and use the variable here
69
53
70
54
error: a `const` item with interior mutability should not be borrowed
71
- --> tests/ui/borrow_interior_mutable_const/traits.rs:160 :18
55
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:161 :18
72
56
|
73
57
LL | let _ = &Self::WRAPPED_SELF;
74
58
| ^^^^^^^^^^^^^^^^^^
75
59
|
76
60
= help: assign this const to a local or static variable, and use the variable here
77
61
78
62
error: a `const` item with interior mutability should not be borrowed
79
- --> tests/ui/borrow_interior_mutable_const/traits.rs:170:18
80
- |
81
- LL | let _ = &Self::DIRECT;
82
- | ^^^^^^^^^^^^
83
- |
84
- = help: assign this const to a local or static variable, and use the variable here
85
-
86
- error: a `const` item with interior mutability should not be borrowed
87
- --> tests/ui/borrow_interior_mutable_const/traits.rs:172:18
88
- |
89
- LL | let _ = &Self::INDIRECT;
90
- | ^^^^^^^^^^^^^^
91
- |
92
- = help: assign this const to a local or static variable, and use the variable here
93
-
94
- error: a `const` item with interior mutability should not be borrowed
95
- --> tests/ui/borrow_interior_mutable_const/traits.rs:182:18
96
- |
97
- LL | let _ = &Self::DIRECT;
98
- | ^^^^^^^^^^^^
99
- |
100
- = help: assign this const to a local or static variable, and use the variable here
101
-
102
- error: a `const` item with interior mutability should not be borrowed
103
- --> tests/ui/borrow_interior_mutable_const/traits.rs:184:18
104
- |
105
- LL | let _ = &Self::INDIRECT;
106
- | ^^^^^^^^^^^^^^
107
- |
108
- = help: assign this const to a local or static variable, and use the variable here
109
-
110
- error: a `const` item with interior mutability should not be borrowed
111
- --> tests/ui/borrow_interior_mutable_const/traits.rs:204:18
63
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:201:18
112
64
|
113
65
LL | let _ = &Self::ATOMIC;
114
66
| ^^^^^^^^^^^^
115
67
|
116
68
= help: assign this const to a local or static variable, and use the variable here
117
69
118
70
error: a `const` item with interior mutability should not be borrowed
119
- --> tests/ui/borrow_interior_mutable_const/traits.rs:209 :18
71
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:206 :18
120
72
|
121
73
LL | let _ = &Self::BOUNDED_ASSOC_TYPE;
122
74
| ^^^^^^^^^^^^^^^^^^^^^^^^
123
75
|
124
76
= help: assign this const to a local or static variable, and use the variable here
125
77
126
78
error: a `const` item with interior mutability should not be borrowed
127
- --> tests/ui/borrow_interior_mutable_const/traits.rs:215 :5
79
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:212 :5
128
80
|
129
81
LL | u64::ATOMIC.store(5, Ordering::SeqCst);
130
82
| ^^^^^^^^^^^
131
83
|
132
84
= help: assign this const to a local or static variable, and use the variable here
133
85
134
86
error: a `const` item with interior mutability should not be borrowed
135
- --> tests/ui/borrow_interior_mutable_const/traits.rs:217 :16
87
+ --> tests/ui/borrow_interior_mutable_const/traits.rs:214 :16
136
88
|
137
89
LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9);
138
90
| ^^^^^^^^^^^
139
91
|
140
92
= help: assign this const to a local or static variable, and use the variable here
141
93
142
- error: aborting due to 17 previous errors
94
+ error: aborting due to 11 previous errors
143
95
0 commit comments