Skip to content

[wip] rustup https://github.com/rust-lang/rust/pull/63543/ #4387

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_clike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
}
if let ItemKind::Enum(ref def, _) = item.node {
for var in &def.variants {
let variant = &var.node;
let variant = &var;
if let Some(ref anon_const) = variant.disr_expr {
let param_env = ty::ParamEnv::empty();
let def_id = cx.tcx.hir().body_owner_def_id(anon_const.body);
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl_lint_pass!(EnumVariantNames => [
]);

fn var2str(var: &Variant) -> LocalInternedString {
var.node.ident.as_str()
var.ident.as_str()
}

/// Returns the number of chars that match from the start
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/large_enum_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
"large size difference between variants",
|db| {
if variant.fields.len() == 1 {
let span = match def.variants[i].node.data {
let span = match def.variants[i].data {
VariantData::Struct(ref fields, ..) | VariantData::Tuple(ref fields, ..) => {
fields[0].ty.span
},
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/missing_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
}

fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, v: &'tcx hir::Variant, _: &hir::Generics) {
self.check_missing_docs_attrs(cx, &v.node.attrs, v.span, "a variant");
self.check_missing_docs_attrs(cx, &v.attrs, v.span, "a variant");
}
}
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Author {
}

fn check_variant(&mut self, cx: &LateContext<'a, 'tcx>, var: &'tcx hir::Variant, generics: &hir::Generics) {
if !has_attr(cx.sess(), &var.node.attrs) {
if !has_attr(cx.sess(), &var.attrs) {
return;
}
prelude();
Expand Down