diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-08-28 10:31:15 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-08-28 10:31:24 +0000 |
| commit | 37f30173a017c7c5fdfb98697daa087fa5ce50c7 (patch) | |
| tree | 61fac466a104c67e5f5fce102a91b150da9e949c /src/libsyntax/fold.rs | |
| parent | b833e8d0a0f964b5e4708531ab579ef5454a5066 (diff) | |
| parent | 9d99fe98ad1980b8bc00678f27b2e324e584bea9 (diff) | |
| download | rust-37f30173a017c7c5fdfb98697daa087fa5ce50c7.tar.gz rust-37f30173a017c7c5fdfb98697daa087fa5ce50c7.zip | |
Rollup merge of #35618 - jseyfried:ast_view_path_refactor, r=eddyb
Refactor `PathListItem`s This refactors away variant `Mod` of `ast::PathListItemKind` and refactors the remaining variant `Ident` to a struct `ast::PathListItem_`.
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index c566aa5661b..504883811e2 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -307,18 +307,10 @@ pub fn noop_fold_view_path<T: Folder>(view_path: P<ViewPath>, fld: &mut T) -> P< ViewPathList(fld.fold_path(path), path_list_idents.move_map(|path_list_ident| { Spanned { - node: match path_list_ident.node { - PathListItemKind::Ident { id, name, rename } => - PathListItemKind::Ident { - id: fld.new_id(id), - rename: rename, - name: name - }, - PathListItemKind::Mod { id, rename } => - PathListItemKind::Mod { - id: fld.new_id(id), - rename: rename - } + node: PathListItem_ { + id: fld.new_id(path_list_ident.node.id), + rename: path_list_ident.node.rename, + name: path_list_ident.node.name, }, span: fld.new_span(path_list_ident.span) } |
