File tree 1 file changed +35
-1
lines changed
1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -2109,6 +2109,41 @@ E0380: r##"
2109
2109
Default impls are only allowed for traits with no methods or associated items.
2110
2110
For more information see the [opt-in builtin traits RFC](https://github.com/rust
2111
2111
-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
2112
+ "## ,
2113
+
2114
+ E0392 : r##"
2115
+ This error indicates that a type parameter has been declared but not actually
2116
+ used.
2117
+
2118
+ Here is an example that demonstrates the error:
2119
+
2120
+ ```
2121
+ enum Foo<T> {
2122
+ Bar
2123
+ }
2124
+ ```
2125
+
2126
+ The first way to fix this error is by removing the type parameter, as
2127
+ shown below:
2128
+
2129
+ ```
2130
+ enum Foo {
2131
+ Bar
2132
+ }
2133
+ ```
2134
+
2135
+ The second method is to actually make use of the type parameter:
2136
+
2137
+ ```
2138
+ enum Foo<T> {
2139
+ Bar(T)
2140
+ }
2141
+ ```
2142
+
2143
+ See the 'Type Parameters' section of the reference for more details
2144
+ on this topic:
2145
+
2146
+ http://doc.rust-lang.org/reference.html#type-parameters-1
2112
2147
"##
2113
2148
2114
2149
}
@@ -2211,7 +2246,6 @@ register_diagnostics! {
2211
2246
E0390 , // only a single inherent implementation marked with
2212
2247
// `#[lang = \"{}\"]` is allowed for the `{}` primitive
2213
2248
E0391 , // unsupported cyclic reference between types/traits detected
2214
- E0392 , // parameter `{}` is never used
2215
2249
E0393 , // the type parameter `{}` must be explicitly specified in an object
2216
2250
// type because its default value `{}` references the type `Self`"
2217
2251
E0399 , // trait items need to be implemented because the associated
You can’t perform that action at this time.
0 commit comments