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

2023-06-22 21:01:48 +00:00
// Check that imports with naked super and self don't fail during parsing
2016-04-16 18:53:40 +00:00
// 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 05:57:10 +00: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 18:53:40 +00:00
}
}
fn main() {}