Skip to content

Commit 0e87918

Browse files
committed
Auto merge of #6971 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents 981ffa7 + 40e68e5 commit 0e87918

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+145
-156
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.52"
3+
version = "0.1.53"
44
authors = ["The Rust Clippy Developers"]
55
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
66
repository = "https://github.com/rust-lang/rust-clippy"

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_lints"
33
# begin automatic update
4-
version = "0.1.52"
4+
version = "0.1.53"
55
# end automatic update
66
authors = ["The Rust Clippy Developers"]
77
description = "A bunch of helpful lints to avoid common pitfalls in Rust"

clippy_lints/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ fn check_deprecated_cfg_attr(cx: &EarlyContext<'_>, attr: &Attribute) {
564564
// check for `rustfmt_skip` and `rustfmt::skip`
565565
if let Some(skip_item) = &items[1].meta_item();
566566
if skip_item.has_name(sym!(rustfmt_skip)) ||
567-
skip_item.path.segments.last().expect("empty path in attribute").ident.name == sym!(skip);
567+
skip_item.path.segments.last().expect("empty path in attribute").ident.name == sym::skip;
568568
// Only lint outer attributes, because custom inner attributes are unstable
569569
// Tracking issue: https://github.com/rust-lang/rust/issues/54726
570570
if let AttrStyle::Outer = attr.style;

clippy_lints/src/escape.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use rustc_hir::intravisit;
44
use rustc_hir::{self, AssocItemKind, Body, FnDecl, HirId, HirIdSet, Impl, ItemKind, Node};
55
use rustc_infer::infer::TyCtxtInferExt;
66
use rustc_lint::{LateContext, LateLintPass};
7+
use rustc_middle::mir::FakeReadCause;
78
use rustc_middle::ty::{self, TraitRef, Ty};
89
use rustc_session::{declare_tool_lint, impl_lint_pass};
910
use rustc_span::source_map::Span;
@@ -184,6 +185,8 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
184185
}
185186
}
186187
}
188+
189+
fn fake_read(&mut self, _: rustc_typeck::expr_use_visitor::Place<'tcx>, _: FakeReadCause, _: HirId) {}
187190
}
188191

189192
impl<'a, 'tcx> EscapeDelegate<'a, 'tcx> {

clippy_lints/src/inconsistent_struct_constructor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl LateLintPass<'_> for InconsistentStructConstructor {
120120

121121
// Check whether the order of the fields in the constructor is consistent with the order in the
122122
// definition.
123-
fn is_consistent_order<'tcx>(fields: &'tcx [hir::Field<'tcx>], def_order_map: &FxHashMap<Symbol, usize>) -> bool {
123+
fn is_consistent_order<'tcx>(fields: &'tcx [hir::ExprField<'tcx>], def_order_map: &FxHashMap<Symbol, usize>) -> bool {
124124
let mut cur_idx = usize::MIN;
125125
for f in fields {
126126
let next_idx = def_order_map[&f.ident.name];

clippy_lints/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(drain_filter)]
66
#![feature(in_band_lifetimes)]
77
#![feature(once_cell)]
8-
#![feature(or_patterns)]
98
#![feature(rustc_private)]
109
#![feature(stmt_expr_attributes)]
1110
#![feature(control_flow_enum)]

clippy_lints/src/lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
388388
self.nested_elision_site_lts.append(&mut sub_visitor.all_lts());
389389
return;
390390
},
391-
TyKind::TraitObject(bounds, ref lt) => {
391+
TyKind::TraitObject(bounds, ref lt, _) => {
392392
if !lt.is_elided() {
393393
self.unelided_trait_object_lifetime = true;
394394
}

clippy_lints/src/loops/mut_range_bound.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use if_chain::if_chain;
55
use rustc_hir::{BindingAnnotation, Expr, HirId, Node, PatKind};
66
use rustc_infer::infer::TyCtxtInferExt;
77
use rustc_lint::LateContext;
8-
use rustc_middle::ty;
8+
use rustc_middle::{mir::FakeReadCause, ty};
99
use rustc_span::source_map::Span;
1010
use rustc_typeck::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
1111

@@ -107,6 +107,8 @@ impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
107107
}
108108
}
109109
}
110+
111+
fn fake_read(&mut self, _: rustc_typeck::expr_use_visitor::Place<'tcx>, _: FakeReadCause, _: HirId) {}
110112
}
111113

112114
impl MutatePairDelegate<'_, '_> {

clippy_lints/src/manual_non_exhaustive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint_and_then;
22
use clippy_utils::meets_msrv;
33
use clippy_utils::source::snippet_opt;
44
use if_chain::if_chain;
5-
use rustc_ast::ast::{Attribute, Item, ItemKind, StructField, Variant, VariantData, VisibilityKind};
5+
use rustc_ast::ast::{Attribute, FieldDef, Item, ItemKind, Variant, VariantData, VisibilityKind};
66
use rustc_attr as attr;
77
use rustc_errors::Applicability;
88
use rustc_lint::{EarlyContext, EarlyLintPass};
@@ -144,11 +144,11 @@ fn check_manual_non_exhaustive_enum(cx: &EarlyContext<'_>, item: &Item, variants
144144
}
145145

146146
fn check_manual_non_exhaustive_struct(cx: &EarlyContext<'_>, item: &Item, data: &VariantData) {
147-
fn is_private(field: &StructField) -> bool {
147+
fn is_private(field: &FieldDef) -> bool {
148148
matches!(field.vis.kind, VisibilityKind::Inherited)
149149
}
150150

151-
fn is_non_exhaustive_marker(field: &StructField) -> bool {
151+
fn is_non_exhaustive_marker(field: &FieldDef) -> bool {
152152
is_private(field) && field.ty.kind.is_unit() && field.ident.map_or(true, |n| n.as_str().starts_with('_'))
153153
}
154154

clippy_lints/src/matches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_span::source_map::{Span, Spanned};
2929
use rustc_span::sym;
3030
use std::cmp::Ordering;
3131
use std::collections::hash_map::Entry;
32-
use std::collections::Bound;
32+
use std::ops::Bound;
3333

3434
declare_clippy_lint! {
3535
/// **What it does:** Checks for matches with a single arm where an `if let`

0 commit comments

Comments
 (0)