syntax: don't store a secondary NodeId for TyPath.

This commit is contained in:
Eduard Burtescu
2015-01-29 21:18:17 +02:00
parent 27747ac1a7
commit a817c69297
21 changed files with 74 additions and 101 deletions

View File

@@ -1076,8 +1076,7 @@ impl<'a> Parser<'a> {
}
pub fn parse_ty_path(&mut self) -> Ty_ {
let path = self.parse_path(LifetimeAndTypesWithoutColons);
TyPath(path, ast::DUMMY_NODE_ID)
TyPath(self.parse_path(LifetimeAndTypesWithoutColons))
}
/// parse a TyBareFn type:
@@ -4815,10 +4814,10 @@ impl<'a> Parser<'a> {
let opt_trait = if could_be_trait && self.eat_keyword(keywords::For) {
// New-style trait. Reinterpret the type as a trait.
match ty.node {
TyPath(ref path, node_id) => {
TyPath(ref path) => {
Some(TraitRef {
path: (*path).clone(),
ref_id: node_id,
ref_id: ty.id,
})
}
_ => {