mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 00:53:31 +00:00
546d2fec29
Closes #2397. This checks the def of the `ItemUse` path instead of checking the capitalization of the path segements. It was noted that this def would sometimes be `Def::Mod` instead of `Def::Enum` but it seems correct now.
32 lines
428 B
Rust
32 lines
428 B
Rust
|
|
|
|
#![warn(clippy, clippy_pedantic)]
|
|
#![allow(unused_imports, dead_code, missing_docs_in_private_items)]
|
|
|
|
use std::cmp::Ordering::*;
|
|
|
|
enum Enum {
|
|
_Foo,
|
|
}
|
|
|
|
use self::Enum::*;
|
|
|
|
fn blarg() {
|
|
use self::Enum::*; // ok, just for a function
|
|
}
|
|
|
|
mod blurg {
|
|
pub use std::cmp::Ordering::*; // ok, re-export
|
|
}
|
|
|
|
mod tests {
|
|
use super::*;
|
|
}
|
|
|
|
#[allow(non_snake_case)]
|
|
mod CamelCaseName {
|
|
}
|
|
|
|
use CamelCaseName::*;
|
|
|
|
fn main() {}
|