Skip to content

Commit 83789b8

Browse files
committed
fmt
1 parent ce6cfc3 commit 83789b8

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
fn main() {
32
let my = monad_bind(mx, T: Try); //~ ERROR invalid `struct` delimiters or `fn` call arguments
43
}

tests/ui/parser/issues/issue-111416.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: invalid `struct` delimiters or `fn` call arguments
2-
--> $DIR/issue-111416.rs:3:14
2+
--> $DIR/issue-111416.rs:2:14
33
|
44
LL | let my = monad_bind(mx, T: Try);
55
| ^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)