diff options
| author | Sean McArthur <sean.monstar@gmail.com> | 2015-07-31 22:20:25 -0700 |
|---|---|---|
| committer | Sean McArthur <sean.monstar@gmail.com> | 2015-08-08 11:54:15 -0700 |
| commit | cfcd449c4c36c68541c3389878e3262dac5e4746 (patch) | |
| tree | 9b938e41ecaffb056741c5e55d7afd7d01a82d18 /src/libsyntax/visit.rs | |
| parent | d03456183e85fe7bd465bbe7c8f67885a2528444 (diff) | |
| download | rust-cfcd449c4c36c68541c3389878e3262dac5e4746.tar.gz rust-cfcd449c4c36c68541c3389878e3262dac5e4746.zip | |
rustc: rename multiple imports in a list
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 649052d123c..27d95cbcf5b 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -233,10 +233,17 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) { ViewPathList(ref prefix, ref list) => { for id in list { match id.node { - PathListIdent { name, .. } => { + PathListIdent { name, rename, .. } => { visitor.visit_ident(id.span, name); + if let Some(ident) = rename { + visitor.visit_ident(id.span, ident); + } + } + PathListMod { rename, .. } => { + if let Some(ident) = rename { + visitor.visit_ident(id.span, ident); + } } - PathListMod { .. } => () } } |
