rust/tests/ui/imports/issue-45829/import-self.rs

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

20 lines
351 B
Rust
Raw Normal View History

mod foo {
pub struct A;
pub struct B;
}
use foo::{self};
2018-11-27 03:56:36 -06:00
//~^ ERROR is defined multiple times
use foo as self;
2018-11-27 03:56:36 -06:00
//~^ ERROR expected identifier
2020-05-03 11:56:52 -05:00
use foo::self; //~ ERROR is defined multiple times
2018-11-27 03:56:36 -06:00
//~^ ERROR `self` imports are only allowed within a { } list
use foo::A;
use foo::{self as A};
2018-11-27 03:56:36 -06:00
//~^ ERROR is defined multiple times
fn main() {}