enum glob use and copies left

This commit is contained in:
Oliver Schneider
2016-12-02 17:38:31 +01:00
parent 59b0077565
commit 16aab71688
15 changed files with 117 additions and 109 deletions

View File

@@ -48,6 +48,8 @@ impl EnumGlobUse {
return; // re-exports are fine
}
if let ItemUse(ref path, UseKind::Glob) = item.node {
// FIXME: ask jseyfried why the qpath.def for `use std::cmp::Ordering::*;`
// extracted through `ItemUse(ref qpath, UseKind::Glob)` is a `Mod` and not an `Enum`
if let Def::Enum(_) = path.def {
span_lint(cx, ENUM_GLOB_USE, item.span, "don't use glob imports for enum variants");
}