diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-11-25 12:46:42 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-11-25 12:51:04 -0800 |
| commit | 234d043d18175aff37200a91df2a1b7c3064fc80 (patch) | |
| tree | 3f66d7311f0ae28f9bc9ef5d1d068e1e21606f26 /src/libsyntax/parse | |
| parent | 79ee8f329d1d3105555fd40be5b0eac56c9a8e8f (diff) | |
| download | rust-234d043d18175aff37200a91df2a1b7c3064fc80.tar.gz rust-234d043d18175aff37200a91df2a1b7c3064fc80.zip | |
Move lifetimes before the *first* type argument
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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() { |
