@@ -45,19 +45,25 @@ error: a `const` item should never be interior mutable
45
45
--> $DIR/declare_interior_mutable_const.rs:44:5
46
46
|
47
47
LL | const INPUT: T;
48
- | ^^^^^^^^^^^^^^^
48
+ | ^^^^^^^^^^^^^-^
49
+ | |
50
+ | consider requiring `T` to be `Copy`
49
51
50
52
error: a `const` item should never be interior mutable
51
53
--> $DIR/declare_interior_mutable_const.rs:47:5
52
54
|
53
55
LL | const ASSOC: Self::NonCopyType;
54
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
+ | ^^^^^^^^^^^^^-----------------^
57
+ | |
58
+ | consider requiring `<Self as Trait<T>>::NonCopyType` to be `Copy`
55
59
56
60
error: a `const` item should never be interior mutable
57
61
--> $DIR/declare_interior_mutable_const.rs:51:5
58
62
|
59
63
LL | const AN_INPUT: T = Self::INPUT;
60
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64
+ | ^^^^^^^^^^^^^^^^-^^^^^^^^^^^^^^^
65
+ | |
66
+ | consider requiring `T` to be `Copy`
61
67
62
68
error: a `const` item should never be interior mutable
63
69
--> $DIR/declare_interior_mutable_const.rs:16:9
@@ -74,7 +80,9 @@ error: a `const` item should never be interior mutable
74
80
--> $DIR/declare_interior_mutable_const.rs:60:5
75
81
|
76
82
LL | const SELF_2: Self;
77
- | ^^^^^^^^^^^^^^^^^^^
83
+ | ^^^^^^^^^^^^^^----^
84
+ | |
85
+ | consider requiring `Self` to be `Copy`
78
86
79
87
error: a `const` item should never be interior mutable
80
88
--> $DIR/declare_interior_mutable_const.rs:81:5
@@ -86,13 +94,17 @@ error: a `const` item should never be interior mutable
86
94
--> $DIR/declare_interior_mutable_const.rs:84:5
87
95
|
88
96
LL | const U_SELF: U = U::SELF_2;
89
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
+ | ^^^^^^^^^^^^^^-^^^^^^^^^^^^^
98
+ | |
99
+ | consider requiring `U` to be `Copy`
90
100
91
101
error: a `const` item should never be interior mutable
92
102
--> $DIR/declare_interior_mutable_const.rs:87:5
93
103
|
94
104
LL | const T_ASSOC: T::NonCopyType = T::ASSOC;
95
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105
+ | ^^^^^^^^^^^^^^^--------------^^^^^^^^^^^^
106
+ | |
107
+ | consider requiring `<T as Trait<u32>>::NonCopyType` to be `Copy`
96
108
97
109
error: aborting due to 13 previous errors
98
110
0 commit comments