You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an error message that seems a bit off to me. The code:
use foo::baz;use bar::baz;fnmain(){}mod foo {pubmod baz {}}mod bar {pubmod baz {}}
Clearly it should fail to compile, and it does. But the error message is:
E0252_module.rs:2:5: 2:13 error: a type named `baz` has already been imported in this module [E0252]
E0252_module.rs:2 use bar::baz;
^~~~~~~~
I would expect something like "a module name baz has already been imported", instead. Is it accurate to call it a type?
The text was updated successfully, but these errors were encountered:
nham
changed the title
Incorrect error message for E0251/E0252 when importing modules.
Possibly incorrect error message for E0251/E0252 when importing modules.
May 14, 2015
nham
changed the title
Possibly incorrect error message for E0251/E0252 when importing modules.
Possibly incorrect/confusing error message for E0251/E0252 when importing modules.
May 14, 2015
Currently in the E0252 message, traits and modules are all called types
(as in "a type named `Foo` has already been imported", even when `Foo` was
a trait or module). This commit changes that to additionally detect when
the import in question is a trait or module and report it accordingly.
Fixesrust-lang#25396.
Currently in the E0252 message, traits and modules are all called types (as in "a type named `Foo` has already been imported", even when `Foo` was a trait or module). This commit changes that to additionally detect when the import in question is a trait or module and report it accordingly.
Fixes#25396.
I found an error message that seems a bit off to me. The code:
Clearly it should fail to compile, and it does. But the error message is:
I would expect something like "a module name
baz
has already been imported", instead. Is it accurate to call it a type?The text was updated successfully, but these errors were encountered: