rust/tests/ui/enum_glob_use.rs
Michael Wright 546d2fec29 Fix enum_glob_use false positives
Closes .

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.
2018-03-27 06:34:11 +02:00

33 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() {}