Skip to content

Commit 141f79f

Browse files
committed
Rustup
1 parent 41972f8 commit 141f79f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

clippy_lints/src/enum_glob_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
4444

4545
impl EnumGlobUse {
4646
fn lint_item(&self, cx: &LateContext, item: &Item) {
47-
if item.vis == Visibility::Public {
47+
if item.vis.node == VisibilityKind::Public {
4848
return; // re-exports are fine
4949
}
5050
if let ItemUse(ref path, UseKind::Glob) = item.node {

clippy_lints/src/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
840840
.iter()
841841
.any(|k| k.matches(first_arg_ty, first_arg, self_ty, is_copy, &implitem.generics));
842842
then {
843-
let lint = if item.vis == hir::Visibility::Public {
843+
let lint = if item.vis.node == hir::VisibilityKind::Public {
844844
WRONG_PUB_SELF_CONVENTION
845845
} else {
846846
WRONG_SELF_CONVENTION

clippy_lints/src/utils/inspector.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
5151
return;
5252
}
5353
println!("impl item `{}`", item.ident.name);
54-
match item.vis {
55-
hir::Visibility::Public => println!("public"),
56-
hir::Visibility::Crate(_) => println!("visible crate wide"),
57-
hir::Visibility::Restricted { ref path, .. } => println!(
54+
match item.vis.node {
55+
hir::VisibilityKind::Public => println!("public"),
56+
hir::VisibilityKind::Crate(_) => println!("visible crate wide"),
57+
hir::VisibilityKind::Restricted { ref path, .. } => println!(
5858
"visible in module `{}`",
5959
print::to_string(print::NO_ANN, |s| s.print_path(path, false))
6060
),
61-
hir::Visibility::Inherited => println!("visibility inherited from outer item"),
61+
hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"),
6262
}
6363
if item.defaultness.is_default() {
6464
println!("default");
@@ -343,14 +343,14 @@ fn print_expr(cx: &LateContext, expr: &hir::Expr, indent: usize) {
343343
fn print_item(cx: &LateContext, item: &hir::Item) {
344344
let did = cx.tcx.hir.local_def_id(item.id);
345345
println!("item `{}`", item.name);
346-
match item.vis {
347-
hir::Visibility::Public => println!("public"),
348-
hir::Visibility::Crate(_) => println!("visible crate wide"),
349-
hir::Visibility::Restricted { ref path, .. } => println!(
346+
match item.vis.node {
347+
hir::VisibilityKind::Public => println!("public"),
348+
hir::VisibilityKind::Crate(_) => println!("visible crate wide"),
349+
hir::VisibilityKind::Restricted { ref path, .. } => println!(
350350
"visible in module `{}`",
351351
print::to_string(print::NO_ANN, |s| s.print_path(path, false))
352352
),
353-
hir::Visibility::Inherited => println!("visibility inherited from outer item"),
353+
hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"),
354354
}
355355
match item.node {
356356
hir::ItemExternCrate(ref _renamed_from) => {

clippy_lints/src/utils/internal_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass {
120120
if let ItemStatic(ref ty, MutImmutable, body_id) = item.node {
121121
if is_lint_ref_type(ty) {
122122
self.declared_lints.insert(item.name, item.span);
123-
} else if is_lint_array_type(ty) && item.vis == Visibility::Inherited && item.name == "ARRAY" {
123+
} else if is_lint_array_type(ty) && item.vis.node == VisibilityKind::Inherited && item.name == "ARRAY" {
124124
let mut collector = LintCollector {
125125
output: &mut self.registered_lints,
126126
cx,

0 commit comments

Comments
 (0)