This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1181,12 +1181,9 @@ impl<'a> Parser<'a> {
11811181 let close_paren = self . prev_token . span ;
11821182 let span = lo. to ( close_paren) ;
11831183 // filter shorthand fields
1184- let fields: Vec < _ > = fields
1185- . into_iter ( )
1186- . filter_map (
1187- |field| if !field. is_shorthand { Some ( field) } else { None } ,
1188- )
1189- . collect ( ) ;
1184+ let fields: Vec < _ > =
1185+ fields. into_iter ( ) . filter ( |field| !field. is_shorthand ) . collect ( ) ;
1186+
11901187 if !fields. is_empty ( ) &&
11911188 // `token.kind` should not be compared here.
11921189 // This is because the `snapshot.token.kind` is treated as the same as
Original file line number Diff line number Diff line change 1-
21fn main ( ) {
32 let my = monad_bind ( mx, T : Try ) ; //~ ERROR invalid `struct` delimiters or `fn` call arguments
43}
Original file line number Diff line number Diff line change 11error: invalid `struct` delimiters or `fn` call arguments
2- --> $DIR/issue-111416.rs:3 :14
2+ --> $DIR/issue-111416.rs:2 :14
33 |
44LL | let my = monad_bind(mx, T: Try);
55 | ^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments