diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index 15ddcbc80749c..0542002994b91 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -93,6 +93,31 @@ mod bar { ``` "##, +E0254: r##" +This error indicates that a `use` declaration added a symbol to the current +namespace that conflicts with a symbol added by an `extern crate` declaration. + +An example of this error: + +There's an external crate and it, also, can have no exports as foo.rs: + +``` +#![crate_type="lib"] +``` + +On the client code, bar.rs: + +``` +extern crate foo; + +use inner_mod::foo; // error, this conflicts with the external crate's symbol + +mod inner_mod { + pub mod foo { } +} +``` +"##, + E0255: r##" You can't import a value whose name is the same as another value defined in the module. @@ -205,7 +230,6 @@ register_diagnostics! { E0157, E0153, E0253, // not directly importable - E0254, // import conflicts with imported crate in this module E0257, E0258, E0364, // item is private