Skip to content

Commit

Permalink
syntax: use parse_extern_abi more.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Oct 7, 2019
1 parent a7ba754 commit 9c6582a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/libsyntax/parse/parser/ty.rs
Expand Up @@ -9,8 +9,6 @@ use crate::parse::token::{self, Token};
use crate::source_map::Span;
use crate::symbol::{kw};

use rustc_target::spec::abi::Abi;

use errors::{Applicability, pluralise};

/// Returns `true` if `IDENT t` can start a type -- `IDENT::a::b`, `IDENT<u8, u8>`,
Expand Down Expand Up @@ -281,12 +279,7 @@ impl<'a> Parser<'a> {
*/

let unsafety = self.parse_unsafety();
let abi = if self.eat_keyword(kw::Extern) {
self.parse_opt_abi()?.unwrap_or(Abi::C)
} else {
Abi::Rust
};

let abi = self.parse_extern_abi()?;
self.expect_keyword(kw::Fn)?;
let cfg = super::ParamCfg {
is_self_allowed: false,
Expand Down

0 comments on commit 9c6582a

Please sign in to comment.