1
Fork 0

Rollup merge of #32570 - eddyb:tis-but-a-front, r=nikomatsakis

r? @nikomatsakis

Conflicts:
	src/librustc_save_analysis/lib.rs
	src/libsyntax/ast_util.rs
This commit is contained in:
Manish Goregaokar 2016-04-06 17:31:16 +05:30
commit 552af51ffb
235 changed files with 1307 additions and 2183 deletions

View file

@ -42,7 +42,6 @@ use ast::{Visibility, WhereClause};
use attr::{ThinAttributes, ThinAttributesExt, AttributesExt};
use ast::{BinOpKind, UnOp};
use ast;
use ast_util::{self, ident_to_path};
use codemap::{self, Span, BytePos, Spanned, spanned, mk_sp, CodeMap};
use errors::{self, DiagnosticBuilder};
use ext::tt::macro_parser;
@ -1575,9 +1574,14 @@ impl<'a> Parser<'a> {
pat
} else {
debug!("parse_arg_general ident_to_pat");
ast_util::ident_to_pat(ast::DUMMY_NODE_ID,
self.last_span,
special_idents::invalid)
let sp = self.last_span;
let spanned = Spanned { span: sp, node: special_idents::invalid };
P(Pat {
id: ast::DUMMY_NODE_ID,
node: PatKind::Ident(BindingMode::ByValue(Mutability::Immutable),
spanned, None),
span: sp
})
};
let t = self.parse_ty_sum()?;
@ -2221,7 +2225,7 @@ impl<'a> Parser<'a> {
ctxt: _
}, token::Plain) => {
self.bump();
let path = ast_util::ident_to_path(mk_sp(lo, hi), id);
let path = ast::Path::from_ident(mk_sp(lo, hi), id);
ex = ExprKind::Path(None, path);
hi = self.last_span.hi;
}
@ -3677,7 +3681,7 @@ impl<'a> Parser<'a> {
// Parse macro invocation
let ident = self.parse_ident()?;
let ident_span = self.last_span;
let path = ident_to_path(ident_span, ident);
let path = ast::Path::from_ident(ident_span, ident);
self.bump();
let delim = self.expect_open_delim()?;
let tts = self.parse_seq_to_end(
@ -5116,7 +5120,7 @@ impl<'a> Parser<'a> {
self.expect(&token::OpenDelim(token::Brace))?;
self.expect(&token::CloseDelim(token::Brace))?;
Ok((ast_util::impl_pretty_name(&opt_trait, None),
Ok((special_idents::invalid,
ItemKind::DefaultImpl(unsafety, opt_trait.unwrap()), None))
} else {
if opt_trait.is_some() {
@ -5132,7 +5136,7 @@ impl<'a> Parser<'a> {
impl_items.push(self.parse_impl_item()?);
}
Ok((ast_util::impl_pretty_name(&opt_trait, Some(&ty)),
Ok((special_idents::invalid,
ItemKind::Impl(unsafety, polarity, generics, opt_trait, ty, impl_items),
Some(attrs)))
}