AST/HIR: Clarify what the optional name in extern crate items mean

This commit is contained in:
Vadim Petrochenkov
2018-03-09 18:51:48 +03:00
parent 61b6bf54fd
commit c6c6cf9515
16 changed files with 42 additions and 58 deletions

View File

@@ -886,7 +886,7 @@ pub fn noop_fold_block<T: Folder>(b: P<Block>, folder: &mut T) -> P<Block> {
pub fn noop_fold_item_kind<T: Folder>(i: ItemKind, folder: &mut T) -> ItemKind {
match i {
ItemKind::ExternCrate(string) => ItemKind::ExternCrate(string),
ItemKind::ExternCrate(orig_name) => ItemKind::ExternCrate(orig_name),
ItemKind::Use(use_tree) => {
ItemKind::Use(use_tree.map(|tree| folder.fold_use_tree(tree)))
}