Skip to content

Commit f2ecf39

Browse files
committed
Auto merge of #6033 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents 0ab75c3 + 4df2069 commit f2ecf39

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clippy_lints/src/enum_variants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl EarlyLintPass for EnumVariantNames {
285285
);
286286
}
287287
}
288-
if item.vis.node.is_pub() {
288+
if item.vis.kind.is_pub() {
289289
let matching = partial_match(mod_camel, &item_camel);
290290
let rmatching = partial_rmatch(mod_camel, &item_camel);
291291
let nchars = mod_camel.chars().count();
@@ -316,7 +316,7 @@ impl EarlyLintPass for EnumVariantNames {
316316
}
317317
}
318318
if let ItemKind::Enum(ref def, _) = item.kind {
319-
let lint = match item.vis.node {
319+
let lint = match item.vis.kind {
320320
VisibilityKind::Public => PUB_ENUM_VARIANT_NAMES,
321321
_ => ENUM_VARIANT_NAMES,
322322
};

clippy_lints/src/manual_non_exhaustive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn check_manual_non_exhaustive_enum(cx: &EarlyContext<'_>, item: &Item, variants
122122

123123
fn check_manual_non_exhaustive_struct(cx: &EarlyContext<'_>, item: &Item, data: &VariantData) {
124124
fn is_private(field: &StructField) -> bool {
125-
matches!(field.vis.node, VisibilityKind::Inherited)
125+
matches!(field.vis.kind, VisibilityKind::Inherited)
126126
}
127127

128128
fn is_non_exhaustive_marker(field: &StructField) -> bool {
@@ -141,7 +141,7 @@ fn check_manual_non_exhaustive_struct(cx: &EarlyContext<'_>, item: &Item, data:
141141

142142
let fields = data.fields();
143143
let private_fields = fields.iter().filter(|f| is_private(f)).count();
144-
let public_fields = fields.iter().filter(|f| f.vis.node.is_pub()).count();
144+
let public_fields = fields.iter().filter(|f| f.vis.kind.is_pub()).count();
145145

146146
if_chain! {
147147
if private_fields == 1 && public_fields >= 1 && public_fields == fields.len() - 1;

clippy_lints/src/single_component_path_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl EarlyLintPass for SingleComponentPathImports {
4141
if_chain! {
4242
if !in_macro(item.span);
4343
if cx.sess.opts.edition == Edition::Edition2018;
44-
if !item.vis.node.is_pub();
44+
if !item.vis.kind.is_pub();
4545
if let ItemKind::Use(use_tree) = &item.kind;
4646
if let segments = &use_tree.prefix.segments;
4747
if segments.len() == 1;

clippy_lints/src/utils/ast_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ pub fn eq_defaultness(l: Defaultness, r: Defaultness) -> bool {
394394

395395
pub fn eq_vis(l: &Visibility, r: &Visibility) -> bool {
396396
use VisibilityKind::*;
397-
match (&l.node, &r.node) {
397+
match (&l.kind, &r.kind) {
398398
(Public, Public) | (Inherited, Inherited) | (Crate(_), Crate(_)) => true,
399399
(Restricted { path: l, .. }, Restricted { path: r, .. }) => eq_path(l, r),
400400
_ => false,

0 commit comments

Comments
 (0)