Skip to content

Commit fdcb5a7

Browse files
committed
[ty] Clarify the use of SymbolKind in auto-import
1 parent 6a025d1 commit fdcb5a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/ty_ide/src/symbols.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,13 @@ impl<'a> From<&'a SymbolTreeWithChildren> for SymbolInfo<'a> {
292292
}
293293
}
294294

295-
/// The kind of symbol
295+
/// The kind of symbol.
296+
///
297+
/// Note that this is computed on a best effort basis. The nature of
298+
/// auto-import is that it tries to do a very low effort scan of a lot of code
299+
/// very quickly. This means that it doesn't use things like type information
300+
/// or completely resolve the definition of every symbol. So for example, we
301+
/// might label a module as a variable, depending on how it was introduced.
296302
#[derive(Debug, Clone, Copy, PartialEq, Eq, get_size2::GetSize)]
297303
pub enum SymbolKind {
298304
Module,

0 commit comments

Comments
 (0)