-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically
Description
For type names only, submodules can't apparently see non-pub types defined in the parent module. So, this code:
struct Name { x : int }
mod test {
use super::Name;
#[test] fn f () {
let a : Name = Name { x : 3};
}
}
... generates this error:
jclements-09740:/tmp clements> rust test /tmp/foo.rs
Running /usr/local/bin/rustc:
/tmp/foo.rs:4:8: 4:20 error: failed to resolve import: super::Name
/tmp/foo.rs:4 use super::Name;
^~~~~~~~~~~~
error: failed to resolve imports
error: aborting due to 2 previous errors
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specifically