1 error: a `const` item with interior mutability should not be borrowed
2 --> $DIR/enums.rs:22:14
4 LL | let _ = &UNFROZEN_VARIANT; //~ ERROR interior mutability
7 = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
8 = help: assign this const to a local or static variable, and use the variable here
10 error: a `const` item with interior mutability should not be borrowed
11 --> $DIR/enums.rs:37:18
13 LL | let _ = &Self::TO_BE_FROZEN_VARIANT; //~ ERROR interior mutable
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
16 = help: assign this const to a local or static variable, and use the variable here
18 error: a `const` item with interior mutability should not be borrowed
19 --> $DIR/enums.rs:41:18
21 LL | let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ ERROR interior mutable
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 = help: assign this const to a local or static variable, and use the variable here
26 error: a `const` item with interior mutability should not be borrowed
27 --> $DIR/enums.rs:50:18
29 LL | let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 = help: assign this const to a local or static variable, and use the variable here
34 error: a `const` item with interior mutability should not be borrowed
35 --> $DIR/enums.rs:52:18
37 LL | let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ ERROR interior mutable
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = help: assign this const to a local or static variable, and use the variable here
42 error: a `const` item with interior mutability should not be borrowed
43 --> $DIR/enums.rs:74:18
45 LL | let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 = help: assign this const to a local or static variable, and use the variable here
50 error: a `const` item with interior mutability should not be borrowed
51 --> $DIR/enums.rs:91:18
53 LL | let _ = &Self::UNFROZEN_VARIANT; //~ ERROR interior mutability
54 | ^^^^^^^^^^^^^^^^^^^^^^
56 = help: assign this const to a local or static variable, and use the variable here
58 error: a `const` item with interior mutability should not be borrowed
59 --> $DIR/enums.rs:92:18
61 LL | let _ = &Self::GENERIC_VARIANT; //~ ERROR interior mutability
62 | ^^^^^^^^^^^^^^^^^^^^^
64 = help: assign this const to a local or static variable, and use the variable here
66 error: a `const` item with interior mutability should not be borrowed
67 --> $DIR/enums.rs:99:14
69 LL | let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT; //~ ERROR interior mutability
70 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72 = help: assign this const to a local or static variable, and use the variable here
74 error: aborting due to 9 previous errors