mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Stop expanding UseTrees during ItemTree lowering
This commit is contained in:
parent
5587d0a3e3
commit
b52df91877
12 changed files with 320 additions and 188 deletions
|
@ -278,9 +278,11 @@ impl TestDB {
|
|||
let node = ast.to_node(self.upcast());
|
||||
(InFile::new(ast.file_id, node.syntax().clone()), "UnresolvedExternCrate")
|
||||
}
|
||||
DefDiagnosticKind::UnresolvedImport { ast, .. } => {
|
||||
let node = ast.to_node(self.upcast());
|
||||
(InFile::new(ast.file_id, node.syntax().clone()), "UnresolvedImport")
|
||||
DefDiagnosticKind::UnresolvedImport { id, .. } => {
|
||||
let item_tree = id.item_tree(self.upcast());
|
||||
let import = &item_tree[id.value];
|
||||
let node = InFile::new(id.file_id(), import.ast_id).to_node(self.upcast());
|
||||
(InFile::new(id.file_id(), node.syntax().clone()), "UnresolvedImport")
|
||||
}
|
||||
DefDiagnosticKind::UnconfiguredCode { ast, .. } => {
|
||||
let node = ast.to_node(self.upcast());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue