Skip to content

[beta] Rollup backports #56174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Nov 23, 2018
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass vis by shared reference
We are not mutating it now.
  • Loading branch information
nikomatsakis authored and pietroalbini committed Nov 22, 2018
commit 4179c40576ee8f6880ec692441b10361768d94cc
12 changes: 6 additions & 6 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2750,7 +2750,7 @@ impl<'a> LoweringContext<'a> {
id: NodeId,
name: &mut Name,
attrs: &hir::HirVec<Attribute>,
vis: &mut hir::Visibility,
vis: &hir::Visibility,
i: &ItemKind,
) -> hir::ItemKind {
match *i {
Expand Down Expand Up @@ -2953,7 +2953,7 @@ impl<'a> LoweringContext<'a> {
tree: &UseTree,
prefix: &Path,
id: NodeId,
vis: &mut hir::Visibility,
vis: &hir::Visibility,
name: &mut Name,
attrs: &hir::HirVec<Attribute>,
) -> hir::ItemKind {
Expand Down Expand Up @@ -3084,7 +3084,7 @@ impl<'a> LoweringContext<'a> {
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();

Expand All @@ -3102,7 +3102,7 @@ impl<'a> LoweringContext<'a> {
let item = this.lower_use_tree(use_tree,
&prefix,
new_id,
&mut vis,
&vis,
&mut name,
attrs);

Expand Down Expand Up @@ -3382,7 +3382,7 @@ impl<'a> LoweringContext<'a> {

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") ||
Expand All @@ -3401,7 +3401,7 @@ impl<'a> LoweringContext<'a> {
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);

Expand Down