Skip to content

Commit

Permalink
Rustup
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 2, 2018
1 parent 41972f8 commit 141f79f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_glob_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {

impl EnumGlobUse {
fn lint_item(&self, cx: &LateContext, item: &Item) {
if item.vis == Visibility::Public {
if item.vis.node == VisibilityKind::Public {
return; // re-exports are fine
}
if let ItemUse(ref path, UseKind::Glob) = item.node {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
.iter()
.any(|k| k.matches(first_arg_ty, first_arg, self_ty, is_copy, &implitem.generics));
then {
let lint = if item.vis == hir::Visibility::Public {
let lint = if item.vis.node == hir::VisibilityKind::Public {
WRONG_PUB_SELF_CONVENTION
} else {
WRONG_SELF_CONVENTION
Expand Down
20 changes: 10 additions & 10 deletions clippy_lints/src/utils/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
return;
}
println!("impl item `{}`", item.ident.name);
match item.vis {
hir::Visibility::Public => println!("public"),
hir::Visibility::Crate(_) => println!("visible crate wide"),
hir::Visibility::Restricted { ref path, .. } => println!(
match item.vis.node {
hir::VisibilityKind::Public => println!("public"),
hir::VisibilityKind::Crate(_) => println!("visible crate wide"),
hir::VisibilityKind::Restricted { ref path, .. } => println!(
"visible in module `{}`",
print::to_string(print::NO_ANN, |s| s.print_path(path, false))
),
hir::Visibility::Inherited => println!("visibility inherited from outer item"),
hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"),
}
if item.defaultness.is_default() {
println!("default");
Expand Down Expand Up @@ -343,14 +343,14 @@ fn print_expr(cx: &LateContext, expr: &hir::Expr, indent: usize) {
fn print_item(cx: &LateContext, item: &hir::Item) {
let did = cx.tcx.hir.local_def_id(item.id);
println!("item `{}`", item.name);
match item.vis {
hir::Visibility::Public => println!("public"),
hir::Visibility::Crate(_) => println!("visible crate wide"),
hir::Visibility::Restricted { ref path, .. } => println!(
match item.vis.node {
hir::VisibilityKind::Public => println!("public"),
hir::VisibilityKind::Crate(_) => println!("visible crate wide"),
hir::VisibilityKind::Restricted { ref path, .. } => println!(
"visible in module `{}`",
print::to_string(print::NO_ANN, |s| s.print_path(path, false))
),
hir::Visibility::Inherited => println!("visibility inherited from outer item"),
hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"),
}
match item.node {
hir::ItemExternCrate(ref _renamed_from) => {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/internal_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass {
if let ItemStatic(ref ty, MutImmutable, body_id) = item.node {
if is_lint_ref_type(ty) {
self.declared_lints.insert(item.name, item.span);
} else if is_lint_array_type(ty) && item.vis == Visibility::Inherited && item.name == "ARRAY" {
} else if is_lint_array_type(ty) && item.vis.node == VisibilityKind::Inherited && item.name == "ARRAY" {
let mut collector = LintCollector {
output: &mut self.registered_lints,
cx,
Expand Down

0 comments on commit 141f79f

Please sign in to comment.