11error: 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
33 |
44LL | let _ = &Self::ATOMIC;
55 | ^^^^^^^^^^^^
@@ -12,132 +12,84 @@ LL | #![deny(clippy::borrow_interior_mutable_const)]
1212 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
1414error: 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
2416 |
2517LL | let _ = &Self::TO_BE_CONCRETE;
2618 | ^^^^^^^^^^^^^^^^^^^^
2719 |
2820 = help: assign this const to a local or static variable, and use the variable here
2921
3022error: 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
3224 |
3325LL | let _ = &Self::TO_BE_UNFROZEN;
3426 | ^^^^^^^^^^^^^^^^^^^^
3527 |
3628 = help: assign this const to a local or static variable, and use the variable here
3729
3830error: 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
4032 |
4133LL | let _ = &Self::WRAPPED_TO_BE_UNFROZEN;
4234 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4335 |
4436 = help: assign this const to a local or static variable, and use the variable here
4537
4638error: 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
4840 |
4941LL | let _ = &Self::BOUNDED;
5042 | ^^^^^^^^^^^^^
5143 |
5244 = help: assign this const to a local or static variable, and use the variable here
5345
5446error: 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
6448 |
6549LL | let _ = &Self::SELF;
6650 | ^^^^^^^^^^
6751 |
6852 = help: assign this const to a local or static variable, and use the variable here
6953
7054error: 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
7256 |
7357LL | let _ = &Self::WRAPPED_SELF;
7458 | ^^^^^^^^^^^^^^^^^^
7559 |
7660 = help: assign this const to a local or static variable, and use the variable here
7761
7862error: 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
11264 |
11365LL | let _ = &Self::ATOMIC;
11466 | ^^^^^^^^^^^^
11567 |
11668 = help: assign this const to a local or static variable, and use the variable here
11769
11870error: 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
12072 |
12173LL | let _ = &Self::BOUNDED_ASSOC_TYPE;
12274 | ^^^^^^^^^^^^^^^^^^^^^^^^
12375 |
12476 = help: assign this const to a local or static variable, and use the variable here
12577
12678error: 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
12880 |
12981LL | u64::ATOMIC.store(5, Ordering::SeqCst);
13082 | ^^^^^^^^^^^
13183 |
13284 = help: assign this const to a local or static variable, and use the variable here
13385
13486error: 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
13688 |
13789LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9);
13890 | ^^^^^^^^^^^
13991 |
14092 = help: assign this const to a local or static variable, and use the variable here
14193
142- error: aborting due to 17 previous errors
94+ error: aborting due to 11 previous errors
14395
0 commit comments