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/ast_util.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/ast_util.rs')
| -rw-r--r-- | src/libsyntax/ast_util.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index c80c4dc3a22..cdae6e663b8 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -407,18 +407,16 @@ impl<'a, O: IdVisitingOperation> Visitor<()> for IdVisitor<'a, O> { ViewItemExternCrate(_, _, node_id) => { self.operation.visit_id(node_id) } - ViewItemUse(ref view_paths) => { - for view_path in view_paths.iter() { - match view_path.node { - ViewPathSimple(_, _, node_id) | - ViewPathGlob(_, node_id) => { - self.operation.visit_id(node_id) - } - ViewPathList(_, ref paths, node_id) => { - self.operation.visit_id(node_id); - for path in paths.iter() { - self.operation.visit_id(path.node.id) - } + ViewItemUse(ref view_path) => { + match view_path.node { + ViewPathSimple(_, _, node_id) | + ViewPathGlob(_, node_id) => { + self.operation.visit_id(node_id) + } + ViewPathList(_, ref paths, node_id) => { + self.operation.visit_id(node_id); + for path in paths.iter() { + self.operation.visit_id(path.node.id) } } } |
