Fix pretty printing of generic associated type constraints

This commit is contained in:
Matthew Jasper 2021-02-11 20:46:58 +00:00
parent 7e0241c637
commit dfa581ff87
2 changed files with 3 additions and 0 deletions

View File

@ -914,6 +914,7 @@ impl<'a> State<'a> {
pub fn print_assoc_constraint(&mut self, constraint: &ast::AssocTyConstraint) {
self.print_ident(constraint.ident);
constraint.gen_args.as_ref().map(|args| self.print_generic_args(args, false));
self.s.space();
match &constraint.kind {
ast::AssocTyConstraintKind::Equality { ty } => {

View File

@ -13,4 +13,6 @@ impl X for () {
type Y<T> where Self: Sized = u32;
}
fn f<T: X<Y<()> = i32>>() {}
fn main() { }