diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2017-09-26 23:04:00 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2017-11-30 13:10:26 +0100 |
| commit | 91ba8b42fcce0491fa8a1b95e4088bcabf9abf4a (patch) | |
| tree | 8816e095bc7a534e8d9ecbe542a5e640d35b6c2c /src/libsyntax/util/node_count.rs | |
| parent | d6b010f98beae1591ea6e8e21008de97d6cf5be4 (diff) | |
| download | rust-91ba8b42fcce0491fa8a1b95e4088bcabf9abf4a.tar.gz rust-91ba8b42fcce0491fa8a1b95e4088bcabf9abf4a.zip | |
Implement RFC 2128 (use_nested_groups)
This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.
Diffstat (limited to 'src/libsyntax/util/node_count.rs')
| -rw-r--r-- | src/libsyntax/util/node_count.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/util/node_count.rs b/src/libsyntax/util/node_count.rs index 0a5d0c2e7fe..ac5642e53cf 100644 --- a/src/libsyntax/util/node_count.rs +++ b/src/libsyntax/util/node_count.rs @@ -133,9 +133,9 @@ impl<'ast> Visitor<'ast> for NodeCounter { self.count += 1; walk_path(self, path) } - fn visit_path_list_item(&mut self, prefix: &Path, item: &PathListItem) { + fn visit_use_tree(&mut self, use_tree: &UseTree, id: NodeId, _nested: bool) { self.count += 1; - walk_path_list_item(self, prefix, item) + walk_use_tree(self, use_tree, id) } fn visit_path_parameters(&mut self, path_span: Span, path_parameters: &PathParameters) { self.count += 1; |
