1
Fork 0

Refactor how global paths are represented (for both ast and hir).

This commit is contained in:
Jeffrey Seyfried 2016-12-05 03:51:11 +00:00
parent 164619a8cf
commit f10f50b426
27 changed files with 242 additions and 257 deletions

View file

@ -633,7 +633,6 @@ mod tests {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Path(None, ast::Path {
span: sp(0, 1),
global: false,
segments: vec![Ident::from_str("a").into()],
}),
span: sp(0, 1),
@ -647,8 +646,9 @@ mod tests {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Path(None, ast::Path {
span: sp(0, 6),
global: true,
segments: vec![Ident::from_str("a").into(), Ident::from_str("b").into()],
segments: vec![ast::PathSegment::crate_root(),
Ident::from_str("a").into(),
Ident::from_str("b").into()]
}),
span: sp(0, 6),
attrs: ThinVec::new(),
@ -757,7 +757,6 @@ mod tests {
id: ast::DUMMY_NODE_ID,
node:ast::ExprKind::Path(None, ast::Path{
span: sp(7, 8),
global: false,
segments: vec![Ident::from_str("d").into()],
}),
span:sp(7,8),
@ -775,7 +774,6 @@ mod tests {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Path(None, ast::Path {
span:sp(0,1),
global:false,
segments: vec![Ident::from_str("b").into()],
}),
span: sp(0,1),
@ -817,7 +815,6 @@ mod tests {
ty: P(ast::Ty{id: ast::DUMMY_NODE_ID,
node: ast::TyKind::Path(None, ast::Path{
span:sp(10,13),
global:false,
segments: vec![Ident::from_str("i32").into()],
}),
span:sp(10,13)
@ -860,7 +857,6 @@ mod tests {
node: ast::ExprKind::Path(None,
ast::Path{
span:sp(17,18),
global:false,
segments: vec![Ident::from_str("b").into()],
}),
span: sp(17,18),