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