pass vis by shared reference
We are not mutating it now.
This commit is contained in:
parent
2bd2fc9418
commit
4c7ce7c897
@ -2752,7 +2752,7 @@ fn lower_item_kind(
|
||||
id: NodeId,
|
||||
name: &mut Name,
|
||||
attrs: &hir::HirVec<Attribute>,
|
||||
vis: &mut hir::Visibility,
|
||||
vis: &hir::Visibility,
|
||||
i: &ItemKind,
|
||||
) -> hir::ItemKind {
|
||||
match *i {
|
||||
@ -2955,7 +2955,7 @@ fn lower_use_tree(
|
||||
tree: &UseTree,
|
||||
prefix: &Path,
|
||||
id: NodeId,
|
||||
vis: &mut hir::Visibility,
|
||||
vis: &hir::Visibility,
|
||||
name: &mut Name,
|
||||
attrs: &hir::HirVec<Attribute>,
|
||||
) -> hir::ItemKind {
|
||||
@ -3086,7 +3086,7 @@ fn lower_use_tree(
|
||||
hir_id: new_hir_id,
|
||||
} = self.lower_node_id(id);
|
||||
|
||||
let mut vis = vis.clone();
|
||||
let vis = vis.clone();
|
||||
let mut name = name.clone();
|
||||
let mut prefix = prefix.clone();
|
||||
|
||||
@ -3104,7 +3104,7 @@ fn lower_use_tree(
|
||||
let item = this.lower_use_tree(use_tree,
|
||||
&prefix,
|
||||
new_id,
|
||||
&mut vis,
|
||||
&vis,
|
||||
&mut name,
|
||||
attrs);
|
||||
|
||||
@ -3384,7 +3384,7 @@ fn lower_item_id_use_tree(&mut self,
|
||||
|
||||
pub fn lower_item(&mut self, i: &Item) -> Option<hir::Item> {
|
||||
let mut name = i.ident.name;
|
||||
let mut vis = self.lower_visibility(&i.vis, None);
|
||||
let vis = self.lower_visibility(&i.vis, None);
|
||||
let attrs = self.lower_attrs(&i.attrs);
|
||||
if let ItemKind::MacroDef(ref def) = i.node {
|
||||
if !def.legacy || attr::contains_name(&i.attrs, "macro_export") ||
|
||||
@ -3403,7 +3403,7 @@ pub fn lower_item(&mut self, i: &Item) -> Option<hir::Item> {
|
||||
return None;
|
||||
}
|
||||
|
||||
let node = self.lower_item_kind(i.id, &mut name, &attrs, &mut vis, &i.node);
|
||||
let node = self.lower_item_kind(i.id, &mut name, &attrs, &vis, &i.node);
|
||||
|
||||
let LoweredNodeId { node_id, hir_id } = self.lower_node_id(i.id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user