mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: Add trait alias grammar to rust.ungram
This commit is contained in:
parent
add85397ae
commit
6674bd898e
6 changed files with 37 additions and 22 deletions
|
@ -236,11 +236,19 @@ impl TraitData {
|
|||
.by_key("rustc_skip_array_during_method_dispatch")
|
||||
.exists();
|
||||
|
||||
let mut collector =
|
||||
AssocItemCollector::new(db, module_id, tree_id.file_id(), ItemContainerId::TraitId(tr));
|
||||
collector.collect(&item_tree, tree_id.tree_id(), &tr_def.items);
|
||||
let (items, attribute_calls, diagnostics) = collector.finish();
|
||||
|
||||
let (items, attribute_calls, diagnostics) = match &tr_def.items {
|
||||
Some(items) => {
|
||||
let mut collector = AssocItemCollector::new(
|
||||
db,
|
||||
module_id,
|
||||
tree_id.file_id(),
|
||||
ItemContainerId::TraitId(tr),
|
||||
);
|
||||
collector.collect(&item_tree, tree_id.tree_id(), items);
|
||||
collector.finish()
|
||||
}
|
||||
None => Default::default(),
|
||||
};
|
||||
(
|
||||
Arc::new(TraitData {
|
||||
name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue