-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically
Description
struct Foo;
fn main() {
Foo::bar();
}ERROR:rustc::middle::resolve: !!! (resolving module in lexical scope) module wasn't actually a module!
<anon>:18:21: 18:29 error: unresolved name
<anon>:18 struct Foo; Foo::bar()
^~~~~~~~
<anon>:18:21: 18:29 error: use of undeclared module `Foo`
<anon>:18 struct Foo; Foo::bar()
^~~~~~~~
ERROR:rustc::middle::resolve: !!! (resolving module in lexical scope) module wasn't actually a module!
<anon>:18:21: 18:29 error: unresolved name `Foo::bar`.
<anon>:18 struct Foo; Foo::bar()
^~~~~~~~
error: aborting due to 3 previous errors
playpen: application terminated with error code 101
If there is some other static method, then calling a non-existent method gives a sensible "cannot resolve method Foo::bar" error.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically