summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/borrow_interior_mutable_const/enums.stderr
blob: 654a1ee7df659a402e4fb4404f43c65f00603cfe (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
error: a `const` item with interior mutability should not be borrowed
  --> $DIR/enums.rs:22:14
   |
LL |     let _ = &UNFROZEN_VARIANT; //~ 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/enums.rs:37:18
   |
LL |         let _ = &Self::TO_BE_FROZEN_VARIANT; //~ 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/enums.rs:41:18
   |
LL |         let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ 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/enums.rs:50:18
   |
LL |         let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ 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/enums.rs:52:18
   |
LL |         let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ 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/enums.rs:74:18
   |
LL |         let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ 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/enums.rs:91:18
   |
LL |         let _ = &Self::UNFROZEN_VARIANT; //~ 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/enums.rs:92:18
   |
LL |         let _ = &Self::GENERIC_VARIANT; //~ 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/enums.rs:99:14
   |
LL |     let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT; //~ ERROR interior mutability
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: assign this const to a local or static variable, and use the variable here

error: aborting due to 9 previous errors