Skip to content

Commit

Permalink
fix interior_mutable_const err
Browse files Browse the repository at this point in the history
  • Loading branch information
DevinR528 committed Mar 2, 2020
1 parent 1272de4 commit be6c313
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/ui/declare_interior_mutable_const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,25 @@ error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:44:5
|
LL | const INPUT: T;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^-^
| |
| consider requiring `T` to be `Copy`

error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:47:5
|
LL | const ASSOC: Self::NonCopyType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^-----------------^
| |
| consider requiring `<Self as Trait<T>>::NonCopyType` to be `Copy`

error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:51:5
|
LL | const AN_INPUT: T = Self::INPUT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^-^^^^^^^^^^^^^^^
| |
| consider requiring `T` to be `Copy`

error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:16:9
Expand All @@ -74,7 +80,9 @@ error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:60:5
|
LL | const SELF_2: Self;
| ^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^----^
| |
| consider requiring `Self` to be `Copy`

error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:81:5
Expand All @@ -86,13 +94,17 @@ error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:84:5
|
LL | const U_SELF: U = U::SELF_2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^-^^^^^^^^^^^^^
| |
| consider requiring `U` to be `Copy`

error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:87:5
|
LL | const T_ASSOC: T::NonCopyType = T::ASSOC;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^--------------^^^^^^^^^^^^
| |
| consider requiring `<T as Trait<u32>>::NonCopyType` to be `Copy`

error: aborting due to 13 previous errors

0 comments on commit be6c313

Please sign in to comment.