|
1 | 1 | error: a `const` item with interior mutability should not be borrowed |
2 | | - --> $DIR/borrow_interior_mutable_const.rs:44:18 |
3 | | - | |
4 | | -LL | let _ = &Self::ASSOC; //~ ERROR interior mutability |
5 | | - | ^^^^^^^^^^^ |
6 | | - | |
7 | | - = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` |
8 | | - = help: assign this const to a local or static variable, and use the variable here |
9 | | - |
10 | | -error: a `const` item with interior mutability should not be borrowed |
11 | | - --> $DIR/borrow_interior_mutable_const.rs:80:5 |
| 2 | + --> $DIR/others.rs:54:5 |
12 | 3 | | |
13 | 4 | LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability |
14 | 5 | | ^^^^^^ |
15 | 6 | | |
| 7 | + = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` |
16 | 8 | = help: assign this const to a local or static variable, and use the variable here |
17 | 9 |
|
18 | 10 | error: a `const` item with interior mutability should not be borrowed |
19 | | - --> $DIR/borrow_interior_mutable_const.rs:81:16 |
| 11 | + --> $DIR/others.rs:55:16 |
20 | 12 | | |
21 | 13 | LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability |
22 | 14 | | ^^^^^^ |
23 | 15 | | |
24 | 16 | = help: assign this const to a local or static variable, and use the variable here |
25 | 17 |
|
26 | 18 | error: a `const` item with interior mutability should not be borrowed |
27 | | - --> $DIR/borrow_interior_mutable_const.rs:84:22 |
| 19 | + --> $DIR/others.rs:58:22 |
28 | 20 | | |
29 | 21 | LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability |
30 | 22 | | ^^^^^^^^^ |
31 | 23 | | |
32 | 24 | = help: assign this const to a local or static variable, and use the variable here |
33 | 25 |
|
34 | 26 | error: a `const` item with interior mutability should not be borrowed |
35 | | - --> $DIR/borrow_interior_mutable_const.rs:85:25 |
| 27 | + --> $DIR/others.rs:59:25 |
36 | 28 | | |
37 | 29 | LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability |
38 | 30 | | ^^^^^^^^^ |
39 | 31 | | |
40 | 32 | = help: assign this const to a local or static variable, and use the variable here |
41 | 33 |
|
42 | 34 | error: a `const` item with interior mutability should not be borrowed |
43 | | - --> $DIR/borrow_interior_mutable_const.rs:86:27 |
| 35 | + --> $DIR/others.rs:60:27 |
44 | 36 | | |
45 | 37 | LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability |
46 | 38 | | ^^^^^^^^^ |
47 | 39 | | |
48 | 40 | = help: assign this const to a local or static variable, and use the variable here |
49 | 41 |
|
50 | 42 | error: a `const` item with interior mutability should not be borrowed |
51 | | - --> $DIR/borrow_interior_mutable_const.rs:87:26 |
| 43 | + --> $DIR/others.rs:61:26 |
52 | 44 | | |
53 | 45 | LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability |
54 | 46 | | ^^^^^^^^^ |
55 | 47 | | |
56 | 48 | = help: assign this const to a local or static variable, and use the variable here |
57 | 49 |
|
58 | 50 | error: a `const` item with interior mutability should not be borrowed |
59 | | - --> $DIR/borrow_interior_mutable_const.rs:98:14 |
| 51 | + --> $DIR/others.rs:72:14 |
60 | 52 | | |
61 | 53 | LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability |
62 | 54 | | ^^^^^^^^^^^^ |
63 | 55 | | |
64 | 56 | = help: assign this const to a local or static variable, and use the variable here |
65 | 57 |
|
66 | 58 | error: a `const` item with interior mutability should not be borrowed |
67 | | - --> $DIR/borrow_interior_mutable_const.rs:99:14 |
| 59 | + --> $DIR/others.rs:73:14 |
68 | 60 | | |
69 | 61 | LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability |
70 | 62 | | ^^^^^^^^^^^^ |
71 | 63 | | |
72 | 64 | = help: assign this const to a local or static variable, and use the variable here |
73 | 65 |
|
74 | 66 | error: a `const` item with interior mutability should not be borrowed |
75 | | - --> $DIR/borrow_interior_mutable_const.rs:100:19 |
| 67 | + --> $DIR/others.rs:74:19 |
76 | 68 | | |
77 | 69 | LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability |
78 | 70 | | ^^^^^^^^^^^^ |
79 | 71 | | |
80 | 72 | = help: assign this const to a local or static variable, and use the variable here |
81 | 73 |
|
82 | 74 | error: a `const` item with interior mutability should not be borrowed |
83 | | - --> $DIR/borrow_interior_mutable_const.rs:101:14 |
| 75 | + --> $DIR/others.rs:75:14 |
84 | 76 | | |
85 | 77 | LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability |
86 | 78 | | ^^^^^^^^^^^^ |
87 | 79 | | |
88 | 80 | = help: assign this const to a local or static variable, and use the variable here |
89 | 81 |
|
90 | 82 | error: a `const` item with interior mutability should not be borrowed |
91 | | - --> $DIR/borrow_interior_mutable_const.rs:102:13 |
| 83 | + --> $DIR/others.rs:76:13 |
92 | 84 | | |
93 | 85 | LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability |
94 | 86 | | ^^^^^^^^^^^^ |
95 | 87 | | |
96 | 88 | = help: assign this const to a local or static variable, and use the variable here |
97 | 89 |
|
98 | 90 | error: a `const` item with interior mutability should not be borrowed |
99 | | - --> $DIR/borrow_interior_mutable_const.rs:108:13 |
| 91 | + --> $DIR/others.rs:82:13 |
100 | 92 | | |
101 | 93 | LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability |
102 | 94 | | ^^^^^^^^^^^^ |
103 | 95 | | |
104 | 96 | = help: assign this const to a local or static variable, and use the variable here |
105 | 97 |
|
106 | 98 | error: a `const` item with interior mutability should not be borrowed |
107 | | - --> $DIR/borrow_interior_mutable_const.rs:113:5 |
| 99 | + --> $DIR/others.rs:87:5 |
108 | 100 | | |
109 | 101 | LL | CELL.set(2); //~ ERROR interior mutability |
110 | 102 | | ^^^^ |
111 | 103 | | |
112 | 104 | = help: assign this const to a local or static variable, and use the variable here |
113 | 105 |
|
114 | 106 | error: a `const` item with interior mutability should not be borrowed |
115 | | - --> $DIR/borrow_interior_mutable_const.rs:114:16 |
| 107 | + --> $DIR/others.rs:88:16 |
116 | 108 | | |
117 | 109 | LL | assert_eq!(CELL.get(), 6); //~ ERROR interior mutability |
118 | 110 | | ^^^^ |
119 | 111 | | |
120 | 112 | = help: assign this const to a local or static variable, and use the variable here |
121 | 113 |
|
122 | | -error: a `const` item with interior mutability should not be borrowed |
123 | | - --> $DIR/borrow_interior_mutable_const.rs:127:5 |
124 | | - | |
125 | | -LL | u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability |
126 | | - | ^^^^^^^^^^^ |
127 | | - | |
128 | | - = help: assign this const to a local or static variable, and use the variable here |
129 | | - |
130 | | -error: a `const` item with interior mutability should not be borrowed |
131 | | - --> $DIR/borrow_interior_mutable_const.rs:128:16 |
132 | | - | |
133 | | -LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability |
134 | | - | ^^^^^^^^^^^ |
135 | | - | |
136 | | - = help: assign this const to a local or static variable, and use the variable here |
137 | | - |
138 | | -error: aborting due to 17 previous errors |
| 114 | +error: aborting due to 14 previous errors |
139 | 115 |
|
0 commit comments