diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-08-22 17:45:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-22 17:45:37 +0200 |
| commit | e53a575ddb3c59ee7b5b1692ddf79a967abcbb10 (patch) | |
| tree | e9225db0bc818c4287ede0d23ba264e2b60a6fe2 /src/libsyntax/parse | |
| parent | 3d8e760bf81019b0ab94b2112b3ef27ce0eb7259 (diff) | |
| parent | 05d19fba27d2e53c64ea8ec488dca4fec7f2b984 (diff) | |
| download | rust-e53a575ddb3c59ee7b5b1692ddf79a967abcbb10.tar.gz rust-e53a575ddb3c59ee7b5b1692ddf79a967abcbb10.zip | |
Rollup merge of #53544 - estebank:issue-53534, r=varkor
Point at the trait argument when using unboxed closure Fix #53534. r? @varkor
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 5467bab33f9..ea353f2a721 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1079,12 +1079,13 @@ impl<'a> Parser<'a> { self.parse_seq_to_before_tokens(&[ket], sep, TokenExpectType::Expect, f) } - fn parse_seq_to_before_tokens<T, F>(&mut self, - kets: &[&token::Token], - sep: SeqSep, - expect: TokenExpectType, - mut f: F) - -> PResult<'a, Vec<T>> + fn parse_seq_to_before_tokens<T, F>( + &mut self, + kets: &[&token::Token], + sep: SeqSep, + expect: TokenExpectType, + mut f: F, + ) -> PResult<'a, Vec<T>> where F: FnMut(&mut Parser<'a>) -> PResult<'a, T> { let mut first: bool = true; @@ -2058,12 +2059,12 @@ impl<'a> Parser<'a> { TokenExpectType::Expect, |p| p.parse_ty())?; self.bump(); // `)` + let span = lo.to(self.prev_span); let output = if self.eat(&token::RArrow) { Some(self.parse_ty_common(false, false)?) } else { None }; - let span = lo.to(self.prev_span); ParenthesisedArgs { inputs, output, span }.into() }; |
