diff options
| author | bors <bors@rust-lang.org> | 2018-08-22 19:59:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-22 19:59:52 +0000 |
| commit | f1b506af022fdcb054aa90da1fbcf8c0226292d0 (patch) | |
| tree | 43f9e1d2cac8d4a873e634ade9214a6c6baee42d /src/libsyntax/parse/parser.rs | |
| parent | b75b0471a8b87c44e0bd953d2a5c36d896128723 (diff) | |
| parent | f012b4c84e9b44b48510712be0ce64cc964b352a (diff) | |
| download | rust-f1b506af022fdcb054aa90da1fbcf8c0226292d0.tar.gz rust-f1b506af022fdcb054aa90da1fbcf8c0226292d0.zip | |
Auto merge of #53607 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 10 pull requests
Successful merges:
- #53418 (Mark some suggestions as MachineApplicable)
- #53431 (Moved some feature gate ui tests to correct location)
- #53442 (Update version of rls-data used with save-analysis)
- #53504 (Set applicability for more suggestions.)
- #53541 (Fix missing impl trait display as ret type)
- #53544 (Point at the trait argument when using unboxed closure)
- #53558 (Normalize source line and column numbers.)
- #53562 (Lament the invincibility of the Turbofish)
- #53574 (Suggest direct raw-pointer dereference)
- #53585 (Remove super old comment on function that parses items)
Failed merges:
- #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)
- #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into())
r? @ghost
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 5467bab33f9..e85b5dca2b7 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() }; @@ -6842,8 +6843,6 @@ impl<'a> Parser<'a> { } /// Parse one of the items allowed by the flags. - /// NB: this function no longer parses the items inside an - /// extern crate. fn parse_item_implementation( &mut self, attrs: Vec<Attribute>, |
