diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:33:45 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:33:45 +0900 |
| commit | b03547bac1301da0a053e1e73a591ebdb0ccd1ca (patch) | |
| tree | 4548245ecf0084513ef81ac742441400cb363878 /src/libsyntax/visit.rs | |
| parent | eea4909a8713a54b3c47e871a70baf6c722999a3 (diff) | |
| download | rust-b03547bac1301da0a053e1e73a591ebdb0ccd1ca.tar.gz rust-b03547bac1301da0a053e1e73a591ebdb0ccd1ca.zip | |
syntax: ViewItemUse no longer contains multiple view paths.
it reflected the obsolete syntax `use a, b, c;` and did not make past the parser (though it was a non-fatal error so we can continue). this legacy affected many portions of rustc and rustdoc as well, so this commit cleans them up altogether.
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index e830daf8ede..260ba247092 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -150,22 +150,20 @@ pub fn walk_view_item<E: Clone, V: Visitor<E>>(visitor: &mut V, vi: &ViewItem, e ViewItemExternCrate(name, _, _) => { visitor.visit_ident(vi.span, name, env) } - ViewItemUse(ref paths) => { - for vp in paths.iter() { - match vp.node { - ViewPathSimple(ident, ref path, id) => { - visitor.visit_ident(vp.span, ident, env.clone()); - visitor.visit_path(path, id, env.clone()); - } - ViewPathGlob(ref path, id) => { - visitor.visit_path(path, id, env.clone()); - } - ViewPathList(ref path, ref list, _) => { - for id in list.iter() { - visitor.visit_ident(id.span, id.node.name, env.clone()) - } - walk_path(visitor, path, env.clone()); + ViewItemUse(ref vp) => { + match vp.node { + ViewPathSimple(ident, ref path, id) => { + visitor.visit_ident(vp.span, ident, env.clone()); + visitor.visit_path(path, id, env.clone()); + } + ViewPathGlob(ref path, id) => { + visitor.visit_path(path, id, env.clone()); + } + ViewPathList(ref path, ref list, _) => { + for id in list.iter() { + visitor.visit_ident(id.span, id.node.name, env.clone()) } + walk_path(visitor, path, env.clone()); } } } |
