rust/tests/ui/auxiliary/wildcard_imports_helper.rs
Christian Stefanescu 5b07b9ed61 Widen understanding of prelude import
Prelude imports are exempt from wildcard import warnings. Until now only
imports of the form

```
use ...::prelude::*;
```

were considered. This change makes it so that the segment `prelude` can
show up anywhere, for instance:

```
use ...::prelude::v1::*;
```

Fixes #5917
2020-08-22 14:22:02 +02:00

27 lines
464 B
Rust

pub use crate::extern_exports::*;
pub fn extern_foo() {}
pub fn extern_bar() {}
pub struct ExternA;
pub mod inner {
pub mod inner_for_self_import {
pub fn inner_extern_foo() {}
pub fn inner_extern_bar() {}
}
}
mod extern_exports {
pub fn extern_exported() {}
pub struct ExternExportedStruct;
pub enum ExternExportedEnum {
A,
}
}
pub mod prelude {
pub mod v1 {
pub struct PreludeModAnywhere;
}
}