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

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:55:16
   |
LL |     assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
   |                ^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:58:22
   |
LL |     let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
   |                      ^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:59:25
   |
LL |     let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
   |                         ^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:60:27
   |
LL |     let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
   |                           ^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:61:26
   |
LL |     let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
   |                          ^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:72:14
   |
LL |     let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
   |              ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:73:14
   |
LL |     let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
   |              ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:74:19
   |
LL |     let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
   |                   ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:75:14
   |
LL |     let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
   |              ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:76:13
   |
LL |     let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
   |             ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:82:13
   |
LL |     let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
   |             ^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:87:5
   |
LL |     CELL.set(2); //~ ERROR interior mutability
   |     ^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: a `const` item with interior mutability should not be borrowed
  --> $DIR/others.rs:88:16
   |
LL |     assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
   |                ^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: aborting due to 14 previous errors