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> {
1181
1181
let close_paren = self.prev_token.span;
1182
1182
let span = lo.to(close_paren);
1183
1183
// 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
+
1190
1187
if !fields.is_empty() &&
1191
1188
// `token.kind` should not be compared here.
1192
1189
// This is because the `snapshot.token.kind` is treated as the same as
Original file line number Diff line number Diff line change 1
-
2
1
fn main() {
3
2
let my = monad_bind(mx, T: Try); //~ ERROR invalid `struct` delimiters or `fn` call arguments
4
3
}
Original file line number Diff line number Diff line change 1
1
error: invalid `struct` delimiters or `fn` call arguments
2
- --> $DIR/issue-111416.rs:3 :14
2
+ --> $DIR/issue-111416.rs:2 :14
3
3
|
4
4
LL | let my = monad_bind(mx, T: Try);
5
5
| ^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments