Print space after formal generic params in fn type
This commit is contained in:
parent
83b15bfe1c
commit
ad29c177f4
@ -2908,10 +2908,7 @@ impl<'a> State<'a> {
|
||||
generic_params: &[ast::GenericParam],
|
||||
) {
|
||||
self.ibox(INDENT_UNIT);
|
||||
if !generic_params.is_empty() {
|
||||
self.word("for");
|
||||
self.print_generic_params(generic_params);
|
||||
}
|
||||
self.print_formal_generic_params(generic_params);
|
||||
let generics = ast::Generics {
|
||||
params: Vec::new(),
|
||||
where_clause: ast::WhereClause {
|
||||
|
@ -2327,10 +2327,7 @@ impl<'a> State<'a> {
|
||||
arg_names: &[Ident],
|
||||
) {
|
||||
self.ibox(INDENT_UNIT);
|
||||
if !generic_params.is_empty() {
|
||||
self.word("for");
|
||||
self.print_generic_params(generic_params);
|
||||
}
|
||||
self.print_formal_generic_params(generic_params);
|
||||
let generics = hir::Generics {
|
||||
params: &[],
|
||||
where_clause: hir::WhereClause { predicates: &[], span: rustc_span::DUMMY_SP },
|
||||
|
@ -803,7 +803,7 @@ fn test_ty() {
|
||||
assert_eq!(stringify_ty!(fn(x: u8)), "fn(x: u8)");
|
||||
#[rustfmt::skip]
|
||||
assert_eq!(stringify_ty!(for<> fn()), "fn()");
|
||||
assert_eq!(stringify_ty!(for<'a> fn()), "for<'a>fn()"); // FIXME
|
||||
assert_eq!(stringify_ty!(for<'a> fn()), "for<'a> fn()");
|
||||
|
||||
// TyKind::Never
|
||||
assert_eq!(stringify_ty!(!), "!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user