]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/wildcard_imports.rs
Auto merge of #105920 - MarcusCalhoun-Lopez:respect_set, r=jyn514
[rust.git] / src / tools / clippy / clippy_lints / src / wildcard_imports.rs
index be98344470b9c5dbc2a6635b9657c820c201a47d..e4d1ee195c4dfb10aed5eed874f7de6fe280d84d 100644 (file)
@@ -176,7 +176,8 @@ fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
                     format!("{import_source_snippet}::{imports_string}")
                 };
 
-                let (lint, message) = if let Res::Def(DefKind::Enum, _) = use_path.res {
+                // Glob imports always have a single resolution.
+                let (lint, message) = if let Res::Def(DefKind::Enum, _) = use_path.res[0] {
                     (ENUM_GLOB_USE, "usage of wildcard import for enum variants")
                 } else {
                     (WILDCARD_IMPORTS, "usage of wildcard import")