Skip to content

Commit a64f024

Browse files
authored
Merge pull request #1909 from dtolnay/fortype
Parse type parameter introducer on closures
2 parents b790b39 + 176099e commit a64f024

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/scan_expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,14 @@ static BREAK_VALUE: [(Input, Action); 3] = [
9292
(Otherwise, SetState(&POSTFIX)),
9393
];
9494

95-
static CLOSURE: [(Input, Action); 6] = [
95+
static CLOSURE: [(Input, Action); 7] = [
9696
(Keyword("async"), SetState(&CLOSURE)),
9797
(Keyword("move"), SetState(&CLOSURE)),
9898
(Punct(","), SetState(&CLOSURE)),
9999
(Punct(">"), SetState(&CLOSURE)),
100100
(Punct("|"), SetState(&CLOSURE_ARGS)),
101101
(ConsumeLifetime, SetState(&CLOSURE)),
102+
(ConsumeIdent, SetState(&CLOSURE)),
102103
];
103104

104105
static CLOSURE_ARGS: [(Input, Action); 2] = [

tests/repo/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ const REVISION: &str = "3672a55b7cfd0a12e7097197b6242872473ffaa7";
2020

2121
#[rustfmt::skip]
2222
static EXCLUDE_FILES: &[&str] = &[
23-
// TODO: non-lifetime binders on closures: `let _ = for<T> || {}`
24-
// https://github.com/dtolnay/syn/issues/1906
25-
"src/tools/rustfmt/tests/target/non-lifetime-binders.rs",
26-
"src/tools/rustfmt/tests/source/non-lifetime-binders.rs",
27-
2823
// TODO: const traits: `pub const trait Trait {}`
2924
// https://github.com/dtolnay/syn/issues/1887
3025
"src/tools/clippy/tests/ui/assign_ops.rs",

0 commit comments

Comments
 (0)