File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
compiler/rustc_hir_pretty/src Expand file tree Collapse file tree 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> {
21482148 s. print_implicit_self ( & decl. implicit_self ) ;
21492149 } else {
21502150 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+ }
21542156 } else if let Some ( body_id) = body_id {
21552157 s. ann . nested ( s, Nested :: BodyParamPat ( body_id, i) ) ;
21562158 s. word ( ":" ) ;
Original file line number Diff line number Diff line change 2727// because they had similar problems. But the pretty-printing tests currently
2828// can' t contain compile errors.
2929
30- fn bare_fn(x: fn(: u32, _: u32, a: u32)) { }
30+ fn bare_fn(x: fn(u32, _: u32, a: u32)) { }
3131
3232extern "C" {
3333 unsafe fn foreign_fn(_: u32, a: u32);
3434}
3535
3636trait T {
37- fn trait_fn(: u32, _: u32, a: u32);
37+ fn trait_fn(u32, _: u32, a: u32);
3838}
You can’t perform that action at this time.
0 commit comments