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_`.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user