File tree 2 files changed +7
-5
lines changed
compiler/rustc_hir_pretty/src
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2148,9 +2148,11 @@ impl<'a> State<'a> {
2148
2148
s. print_implicit_self ( & decl. implicit_self ) ;
2149
2149
} else {
2150
2150
if let Some ( arg_name) = arg_names. get ( i) {
2151
- s. word ( arg_name. to_string ( ) ) ;
2152
- s. word ( ":" ) ;
2153
- s. space ( ) ;
2151
+ if arg_name. name != kw:: Empty {
2152
+ s. word ( arg_name. to_string ( ) ) ;
2153
+ s. word ( ":" ) ;
2154
+ s. space ( ) ;
2155
+ }
2154
2156
} else if let Some ( body_id) = body_id {
2155
2157
s. ann . nested ( s, Nested :: BodyParamPat ( body_id, i) ) ;
2156
2158
s. word ( ":" ) ;
Original file line number Diff line number Diff line change 27
27
// because they had similar problems. But the pretty-printing tests currently
28
28
// can' t contain compile errors.
29
29
30
- fn bare_fn(x: fn(: u32, _: u32, a: u32)) { }
30
+ fn bare_fn(x: fn(u32, _: u32, a: u32)) { }
31
31
32
32
extern "C" {
33
33
unsafe fn foreign_fn(_: u32, a: u32);
34
34
}
35
35
36
36
trait T {
37
- fn trait_fn(: u32, _: u32, a: u32);
37
+ fn trait_fn(u32, _: u32, a: u32);
38
38
}
You can’t perform that action at this time.
0 commit comments