mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
5b07b9ed61
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
27 lines
464 B
Rust
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;
|
|
}
|
|
}
|