]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/borrow_interior_mutable_const/others.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / src / tools / clippy / tests / ui / borrow_interior_mutable_const / others.stderr
1 error: a `const` item with interior mutability should not be borrowed
2   --> $DIR/others.rs:54:5
3    |
4 LL |     ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
5    |     ^^^^^^
6    |
7    = help: assign this const to a local or static variable, and use the variable here
8    = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
9
10 error: a `const` item with interior mutability should not be borrowed
11   --> $DIR/others.rs:55:16
12    |
13 LL |     assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
14    |                ^^^^^^
15    |
16    = help: assign this const to a local or static variable, and use the variable here
17
18 error: a `const` item with interior mutability should not be borrowed
19   --> $DIR/others.rs:58:22
20    |
21 LL |     let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
22    |                      ^^^^^^^^^
23    |
24    = help: assign this const to a local or static variable, and use the variable here
25
26 error: a `const` item with interior mutability should not be borrowed
27   --> $DIR/others.rs:59:25
28    |
29 LL |     let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
30    |                         ^^^^^^^^^
31    |
32    = help: assign this const to a local or static variable, and use the variable here
33
34 error: a `const` item with interior mutability should not be borrowed
35   --> $DIR/others.rs:60:27
36    |
37 LL |     let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
38    |                           ^^^^^^^^^
39    |
40    = help: assign this const to a local or static variable, and use the variable here
41
42 error: a `const` item with interior mutability should not be borrowed
43   --> $DIR/others.rs:61:26
44    |
45 LL |     let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
46    |                          ^^^^^^^^^
47    |
48    = help: assign this const to a local or static variable, and use the variable here
49
50 error: a `const` item with interior mutability should not be borrowed
51   --> $DIR/others.rs:72:14
52    |
53 LL |     let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
54    |              ^^^^^^^^^^^^
55    |
56    = help: assign this const to a local or static variable, and use the variable here
57
58 error: a `const` item with interior mutability should not be borrowed
59   --> $DIR/others.rs:73:14
60    |
61 LL |     let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
62    |              ^^^^^^^^^^^^
63    |
64    = help: assign this const to a local or static variable, and use the variable here
65
66 error: a `const` item with interior mutability should not be borrowed
67   --> $DIR/others.rs:74:19
68    |
69 LL |     let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
70    |                   ^^^^^^^^^^^^
71    |
72    = help: assign this const to a local or static variable, and use the variable here
73
74 error: a `const` item with interior mutability should not be borrowed
75   --> $DIR/others.rs:75:14
76    |
77 LL |     let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
78    |              ^^^^^^^^^^^^
79    |
80    = help: assign this const to a local or static variable, and use the variable here
81
82 error: a `const` item with interior mutability should not be borrowed
83   --> $DIR/others.rs:76:13
84    |
85 LL |     let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
86    |             ^^^^^^^^^^^^
87    |
88    = help: assign this const to a local or static variable, and use the variable here
89
90 error: a `const` item with interior mutability should not be borrowed
91   --> $DIR/others.rs:82:13
92    |
93 LL |     let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
94    |             ^^^^^^^^^^^^
95    |
96    = help: assign this const to a local or static variable, and use the variable here
97
98 error: a `const` item with interior mutability should not be borrowed
99   --> $DIR/others.rs:87:5
100    |
101 LL |     CELL.set(2); //~ ERROR interior mutability
102    |     ^^^^
103    |
104    = help: assign this const to a local or static variable, and use the variable here
105
106 error: a `const` item with interior mutability should not be borrowed
107   --> $DIR/others.rs:88:16
108    |
109 LL |     assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
110    |                ^^^^
111    |
112    = help: assign this const to a local or static variable, and use the variable here
113
114 error: aborting due to 14 previous errors
115