]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/borrow_interior_mutable_const/traits.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 / traits.stderr
1 error: a `const` item with interior mutability should not be borrowed
2   --> $DIR/traits.rs:15:18
3    |
4 LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
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/traits.rs:26:18
12    |
13 LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
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/traits.rs:51:18
20    |
21 LL |         let _ = &Self::TO_BE_CONCRETE; //~ ERROR interior mutable
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/traits.rs:86:18
28    |
29 LL |         let _ = &Self::TO_BE_UNFROZEN; //~ ERROR interior mutable
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/traits.rs:87:18
36    |
37 LL |         let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR interior mutable
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/traits.rs:109:18
44    |
45 LL |         let _ = &Self::BOUNDED; //~ ERROR interior mutable
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/traits.rs:122:18
52    |
53 LL |         let _ = &Self::BOUNDED; //~ ERROR interior mutable
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/traits.rs:151:18
60    |
61 LL |         let _ = &Self::SELF; //~ ERROR interior mutable
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/traits.rs:152:18
68    |
69 LL |         let _ = &Self::WRAPPED_SELF; //~ ERROR interior mutable
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/traits.rs:162:18
76    |
77 LL |         let _ = &Self::INDIRECT; //~ ERROR interior mutable
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/traits.rs:172:18
84    |
85 LL |         let _ = &Self::INDIRECT; //~ ERROR interior mutable
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/traits.rs:191:18
92    |
93 LL |         let _ = &Self::ATOMIC; //~ ERROR interior mutable
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/traits.rs:195:18
100    |
101 LL |         let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR interior mutable
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/traits.rs:200:5
108    |
109 LL |     u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
110    |     ^^^^^^^^^^^
111    |
112    = help: assign this const to a local or static variable, and use the variable here
113
114 error: a `const` item with interior mutability should not be borrowed
115   --> $DIR/traits.rs:201:16
116    |
117 LL |     assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
118    |                ^^^^^^^^^^^
119    |
120    = help: assign this const to a local or static variable, and use the variable here
121
122 error: aborting due to 15 previous errors
123