From 234d043d18175aff37200a91df2a1b7c3064fc80 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sun, 25 Nov 2018 12:46:42 -0800 Subject: Move lifetimes before the *first* type argument --- src/libsyntax/parse/parser.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 07e13ffc314..1fdf86d4867 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5229,7 +5229,9 @@ impl<'a> Parser<'a> { } else if self.check_ident() { // Parse type parameter. params.push(self.parse_ty_param(attrs)?); - seen_ty_param = Some(self.prev_span); + if seen_ty_param.is_none() { + seen_ty_param = Some(self.prev_span); + } } else { // Check for trailing attributes and stop parsing. if !attrs.is_empty() { -- cgit 1.4.1-3-g733a5