summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/borrow_interior_mutable_const/traits.stderr
blob: 8f26403abd3ee0444c0f05a52e4cad2677f0b065 (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
116
117
118
119
120
121
122
123
error: a `const` item with interior mutability should not be borrowed
  --> $DIR/traits.rs:15:18
   |
LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^
   |
   = 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/traits.rs:26:18
   |
LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^
   |
   = 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/traits.rs:51:18
   |
LL |         let _ = &Self::TO_BE_CONCRETE; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^^^^^^^
   |
   = 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/traits.rs:86:18
   |
LL |         let _ = &Self::TO_BE_UNFROZEN; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^^^^^^^
   |
   = 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/traits.rs:87:18
   |
LL |         let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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/traits.rs:109:18
   |
LL |         let _ = &Self::BOUNDED; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^
   |
   = 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/traits.rs:122:18
   |
LL |         let _ = &Self::BOUNDED; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^
   |
   = 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/traits.rs:151:18
   |
LL |         let _ = &Self::SELF; //~ ERROR interior mutable
   |                  ^^^^^^^^^^
   |
   = 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/traits.rs:152:18
   |
LL |         let _ = &Self::WRAPPED_SELF; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^^^^^
   |
   = 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/traits.rs:162:18
   |
LL |         let _ = &Self::INDIRECT; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^
   |
   = 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/traits.rs:172:18
   |
LL |         let _ = &Self::INDIRECT; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^
   |
   = 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/traits.rs:191:18
   |
LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^
   |
   = 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/traits.rs:195:18
   |
LL |         let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR interior mutable
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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/traits.rs:200:5
   |
LL |     u64::ATOMIC.store(5, 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/traits.rs:201:16
   |
LL |     assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
   |                ^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: aborting due to 15 previous errors