1
Fork 0

Auto merge of #51023 - kennytm:rollup, r=kennytm

Rollup of 9 pull requests

Successful merges:

 - #50864 (Add NetBSD/arm target specs)
 - #50956 (rust-gdb: work around the re-used -d argument in cgdb)
 - #50964 (Make sure that queries have predictable symbol names.)
 - #50965 (Update LLVM to pull in another wasm fix)
 - #50972 (Add -Z no-parallel-llvm flag)
 - #50979 (Fix span for type-only arguments)
 - #50981 (Shrink `LiveNode`.)
 - #50995 (move type out of unsafe block)
 - #51011 ( rustdoc: hide macro export statements from docs)

Failed merges:
This commit is contained in:
bors 2018-05-24 12:05:47 +00:00
commit d022dd48cc
17 changed files with 137 additions and 45 deletions

View file

@ -1772,27 +1772,27 @@ impl<'a> Parser<'a> {
pub fn parse_arg_general(&mut self, require_name: bool) -> PResult<'a, Arg> {
maybe_whole!(self, NtArg, |x| x);
let pat = if require_name || self.is_named_argument() {
let (pat, ty) = if require_name || self.is_named_argument() {
debug!("parse_arg_general parse_pat (require_name:{})",
require_name);
let pat = self.parse_pat()?;
self.expect(&token::Colon)?;
pat
(pat, self.parse_ty()?)
} else {
debug!("parse_arg_general ident_to_pat");
let ident = Ident::new(keywords::Invalid.name(), self.prev_span);
P(Pat {
let ty = self.parse_ty()?;
let pat = P(Pat {
id: ast::DUMMY_NODE_ID,
node: PatKind::Ident(BindingMode::ByValue(Mutability::Immutable), ident, None),
span: ident.span,
})
span: ty.span,
});
(pat, ty)
};
let t = self.parse_ty()?;
Ok(Arg {
ty: t,
ty,
pat,
id: ast::DUMMY_NODE_ID,
})