File tree Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Original file line number Diff line number Diff line change @@ -671,23 +671,7 @@ pub(crate) mod parsing {
671
671
lifetimes : {
672
672
let mut lifetimes = Punctuated :: new ( ) ;
673
673
while !input. peek ( Token ! [ >] ) {
674
- let attrs = input. call ( Attribute :: parse_outer) ?;
675
-
676
- let lookahead = input. lookahead1 ( ) ;
677
- if lookahead. peek ( Lifetime ) {
678
- lifetimes. push_value ( GenericParam :: Lifetime ( LifetimeParam {
679
- attrs,
680
- ..input. parse ( ) ?
681
- } ) ) ;
682
- } else if cfg ! ( feature = "full" ) && lookahead. peek ( Ident ) {
683
- lifetimes. push_value ( GenericParam :: Type ( TypeParam {
684
- attrs,
685
- ..input. parse ( ) ?
686
- } ) ) ;
687
- } else {
688
- return Err ( lookahead. error ( ) ) ;
689
- }
690
-
674
+ lifetimes. push_value ( input. parse ( ) ?) ;
691
675
if input. peek ( Token ! [ >] ) {
692
676
break ;
693
677
}
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ const REVISION: &str = "3672a55b7cfd0a12e7097197b6242872473ffaa7";
20
20
21
21
#[ rustfmt:: skip]
22
22
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
+
23
28
// TODO: const traits: `pub const trait Trait {}`
24
29
// https://github.com/dtolnay/syn/issues/1887
25
30
"src/tools/clippy/tests/ui/assign_ops.rs" ,
@@ -308,10 +313,6 @@ static EXCLUDE_FILES: &[&str] = &[
308
313
// Lifetimes and types out of order in angle bracketed path arguments
309
314
"tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs" ,
310
315
311
- // Const parameter in lifetime binder: `for<const C: usize> [T; C]: Sized`
312
- "src/tools/rustfmt/tests/target/non-lifetime-binders.rs" ,
313
- "src/tools/rustfmt/tests/source/non-lifetime-binders.rs" ,
314
-
315
316
// Deprecated anonymous parameter syntax in traits
316
317
"src/tools/rustfmt/tests/source/trait.rs" ,
317
318
"src/tools/rustfmt/tests/target/trait.rs" ,
You can’t perform that action at this time.
0 commit comments