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 {
671671 lifetimes : {
672672 let mut lifetimes = Punctuated :: new ( ) ;
673673 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 ( ) ?) ;
691675 if input. peek ( Token ! [ >] ) {
692676 break ;
693677 }
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ const REVISION: &str = "3672a55b7cfd0a12e7097197b6242872473ffaa7";
2020
2121#[ rustfmt:: skip]
2222static 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+
2328 // TODO: const traits: `pub const trait Trait {}`
2429 // https://github.com/dtolnay/syn/issues/1887
2530 "src/tools/clippy/tests/ui/assign_ops.rs" ,
@@ -308,10 +313,6 @@ static EXCLUDE_FILES: &[&str] = &[
308313 // Lifetimes and types out of order in angle bracketed path arguments
309314 "tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs" ,
310315
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-
315316 // Deprecated anonymous parameter syntax in traits
316317 "src/tools/rustfmt/tests/source/trait.rs" ,
317318 "src/tools/rustfmt/tests/target/trait.rs" ,
You can’t perform that action at this time.
0 commit comments