rust/tests/ui/use/use-keyword.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
503 B
Rust
Raw Normal View History

2016-04-16 21:53:40 +03:00
// Check that imports with nakes super and self don't fail during parsing
// FIXME: this shouldn't fail during name resolution either
mod a {
mod b {
use self as A;
//~^ ERROR `self` imports are only allowed within a { } list
2016-08-22 13:57:10 +08:00
use super as B;
//~^ ERROR unresolved import `super` [E0432]
//~| no `super` in the root
use super::{self as C};
//~^ ERROR unresolved import `super` [E0432]
//~| no `super` in the root
2016-04-16 21:53:40 +03:00
}
}
fn main() {}