]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/rust-analyzer/crates/ide-db/src/search.rs
Rollup merge of #102913 - SparrowLii:import-candidate, r=compiler-errors
[rust.git] / src / tools / rust-analyzer / crates / ide-db / src / search.rs
index 7cabdb55e8d284100a4a272f0888029340742bcb..82b85f2fa5edd58ed58c59aa172c1599bb7c994d 100644 (file)
@@ -239,6 +239,7 @@ fn search_scope(&self, db: &RootDatabase) -> SearchScope {
                 DefWithBody::Function(f) => f.source(db).map(|src| src.syntax().cloned()),
                 DefWithBody::Const(c) => c.source(db).map(|src| src.syntax().cloned()),
                 DefWithBody::Static(s) => s.source(db).map(|src| src.syntax().cloned()),
+                DefWithBody::Variant(v) => v.source(db).map(|src| src.syntax().cloned()),
             };
             return match def {
                 Some(def) => SearchScope::file_range(def.as_ref().original_file_range(db)),