fix: Add trait alias grammar to rust.ungram

This commit is contained in:
Lukas Wirth 2022-11-11 15:25:15 +01:00
parent add85397ae
commit 6674bd898e
6 changed files with 37 additions and 22 deletions

View file

@ -451,15 +451,7 @@ impl<'a> Ctx<'a> {
.collect()
});
let ast_id = self.source_ast_id_map.ast_id(trait_def);
let res = Trait {
name,
visibility,
generic_params,
is_auto,
is_unsafe,
items: items.unwrap_or_default(),
ast_id,
};
let res = Trait { name, visibility, generic_params, is_auto, is_unsafe, items, ast_id };
Some(id(self.data().traits.alloc(res)))
}