mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +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
|
@ -375,12 +375,21 @@ impl<'a> Printer<'a> {
|
|||
}
|
||||
w!(self, "trait {}", name);
|
||||
self.print_generic_params(generic_params);
|
||||
self.print_where_clause_and_opening_brace(generic_params);
|
||||
self.indented(|this| {
|
||||
for item in &**items {
|
||||
this.print_mod_item((*item).into());
|
||||
match items {
|
||||
Some(items) => {
|
||||
self.print_where_clause_and_opening_brace(generic_params);
|
||||
self.indented(|this| {
|
||||
for item in &**items {
|
||||
this.print_mod_item((*item).into());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
None => {
|
||||
w!(self, " = ");
|
||||
// FIXME: Print the aliased traits
|
||||
self.print_where_clause_and_opening_brace(generic_params);
|
||||
}
|
||||
}
|
||||
wln!(self, "}}");
|
||||
}
|
||||
ModItem::Impl(it) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue