File tree 1 file changed +22
-2
lines changed 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 12
12
13
13
register_long_diagnostics ! {
14
14
15
+ E0046 : r##"
16
+ When trying to make some type implement a trait `Foo`, you must, at minimum,
17
+ provide implementations for all of `Foo`'s required methods (meaning the
18
+ methods that do not have default implementations), as well as any required
19
+ trait items like associated types or constants.
20
+ "## ,
21
+
22
+ E0054 : r##"
23
+ It is not allowed to cast to a bool. If you are trying to cast a numeric type
24
+ to a bool, you can compare it with zero instead:
25
+
26
+ ```
27
+ let x = 5;
28
+
29
+ // Ok
30
+ let x_is_nonzero = x != 0;
31
+
32
+ // Not allowed, won't compile
33
+ let x_is_nonzero = x as bool;
34
+ ```
35
+ "## ,
36
+
15
37
E0081 : r##"
16
38
Enum discriminants are used to differentiate enum variants stored in memory.
17
39
This error indicates that the same value was used for two or more variants,
@@ -106,11 +128,9 @@ register_diagnostics! {
106
128
E0040 , // explicit use of destructor method
107
129
E0044 ,
108
130
E0045 ,
109
- E0046 ,
110
131
E0049 ,
111
132
E0050 ,
112
133
E0053 ,
113
- E0054 ,
114
134
E0055 ,
115
135
E0057 ,
116
136
E0059 ,
You can’t perform that action at this time.
0 commit comments