File tree 1 file changed +39
-1
lines changed
1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,45 @@ fn main() {}
153
153
It's invalid to directly import methods belonging to a trait or concrete type.
154
154
"## ,
155
155
156
+ E0254 : r##"
157
+ Attempt was made to import an item whereas an extern crate with this name has
158
+ already been imported.
159
+
160
+ Erroneous code example:
161
+
162
+ ```compile_fail,E0254
163
+ extern crate collections;
164
+
165
+ mod foo {
166
+ pub trait collections {
167
+ fn do_something();
168
+ }
169
+ }
170
+
171
+ use foo::collections; // error: an extern crate named `collections` has already
172
+ // been imported in this module
173
+
174
+ fn main() {}
175
+ ```
176
+
177
+ To fix issue issue, you have to rename at least one of the two imports.
178
+ Example:
179
+
180
+ ```ignore
181
+ extern crate collections as libcollections; // ok!
182
+
183
+ mod foo {
184
+ pub trait collections {
185
+ fn do_something();
186
+ }
187
+ }
188
+
189
+ use foo::collections;
190
+
191
+ fn main() {}
192
+ ```
193
+ "## ,
194
+
156
195
E0255 : r##"
157
196
You can't import a value whose name is the same as another value defined in the
158
197
module.
@@ -1237,7 +1276,6 @@ impl Foo for i32 {}
1237
1276
register_diagnostics ! {
1238
1277
// E0153, unused error code
1239
1278
// E0157, unused error code
1240
- E0254 , // import conflicts with imported crate in this module
1241
1279
// E0257,
1242
1280
// E0258,
1243
1281
E0402 , // cannot use an outer type parameter in this context
You can’t perform that action at this time.
0 commit comments