Skip to content

Commit 991610a

Browse files
committed
Auto merge of #10473 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents a7fae6e + f3074c4 commit 991610a

39 files changed

+49
-65
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.69"
3+
version = "0.1.70"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/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_lints"
3-
version = "0.1.69"
3+
version = "0.1.70"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/src/dereference.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ fn binding_ty_auto_deref_stability<'tcx>(
10491049
))
10501050
.is_sized(cx.tcx, cx.param_env.without_caller_bounds()),
10511051
),
1052-
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err => {
1052+
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err(_) => {
10531053
Position::ReborrowStable(precedence)
10541054
},
10551055
};
@@ -1065,7 +1065,7 @@ fn ty_contains_infer(ty: &hir::Ty<'_>) -> bool {
10651065
if self.0
10661066
|| matches!(
10671067
ty.kind,
1068-
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err
1068+
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err(_)
10691069
)
10701070
{
10711071
self.0 = true;
@@ -1357,7 +1357,7 @@ fn replace_types<'tcx>(
13571357
&& let Some(term_ty) = projection_predicate.term.ty()
13581358
&& let ty::Param(term_param_ty) = term_ty.kind()
13591359
{
1360-
let projection = cx.tcx.mk_ty(ty::Alias(
1360+
let projection = cx.tcx.mk_ty_from_kind(ty::Alias(
13611361
ty::Projection,
13621362
projection_predicate.projection_ty.with_self_ty(cx.tcx, new_ty),
13631363
));

clippy_lints/src/derivable_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_hir::{
88
Body, Expr, ExprKind, GenericArg, Impl, ImplItemKind, Item, ItemKind, Node, PathSegment, QPath, Ty, TyKind,
99
};
1010
use rustc_lint::{LateContext, LateLintPass};
11-
use rustc_middle::ty::{Adt, AdtDef, DefIdTree, SubstsRef};
11+
use rustc_middle::ty::{Adt, AdtDef, SubstsRef};
1212
use rustc_session::{declare_tool_lint, impl_lint_pass};
1313
use rustc_span::sym;
1414

clippy_lints/src/derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ fn param_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) ->
514514
}
515515

516516
ParamEnv::new(
517-
tcx.mk_predicates(ty_predicates.iter().map(|&(p, _)| p).chain(
517+
tcx.mk_predicates_from_iter(ty_predicates.iter().map(|&(p, _)| p).chain(
518518
params.iter().filter(|&&(_, needs_eq)| needs_eq).map(|&(param, _)| {
519519
tcx.mk_predicate(Binder::dummy(PredicateKind::Clause(Clause::Trait(TraitPredicate {
520520
trait_ref: tcx.mk_trait_ref(eq_trait_id, [tcx.mk_param_from_def(param)]),

clippy_lints/src/loops/manual_flatten.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_errors::Applicability;
99
use rustc_hir::def::{DefKind, Res};
1010
use rustc_hir::{Expr, Pat, PatKind};
1111
use rustc_lint::LateContext;
12-
use rustc_middle::ty::{self, DefIdTree};
12+
use rustc_middle::ty;
1313
use rustc_span::source_map::Span;
1414

1515
/// Check for unnecessary `if let` usage in a for loop where only the `Some` or `Ok` variant of the

clippy_lints/src/loops/never_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ fn never_loop_expr(expr: &Expr<'_>, ignore_ids: &mut Vec<HirId>, main_loop_id: H
232232
| ExprKind::Path(_)
233233
| ExprKind::ConstBlock(_)
234234
| ExprKind::Lit(_)
235-
| ExprKind::Err => NeverLoopResult::Otherwise,
235+
| ExprKind::Err(_) => NeverLoopResult::Otherwise,
236236
}
237237
}
238238

clippy_lints/src/manual_non_exhaustive.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use rustc_errors::Applicability;
88
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
99
use rustc_hir::{self as hir, Expr, ExprKind, QPath};
1010
use rustc_lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
11-
use rustc_middle::ty::DefIdTree;
1211
use rustc_session::{declare_tool_lint, impl_lint_pass};
1312
use rustc_span::def_id::{DefId, LocalDefId};
1413
use rustc_span::{sym, Span};

clippy_lints/src/matches/manual_unwrap_or.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use rustc_hir::def::{DefKind, Res};
1010
use rustc_hir::LangItem::{OptionNone, ResultErr};
1111
use rustc_hir::{Arm, Expr, PatKind};
1212
use rustc_lint::LateContext;
13-
use rustc_middle::ty::DefIdTree;
1413
use rustc_span::sym;
1514

1615
use super::MANUAL_UNWRAP_OR;

clippy_lints/src/matches/redundant_pattern_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_hir::def::{DefKind, Res};
1212
use rustc_hir::LangItem::{self, OptionNone, OptionSome, PollPending, PollReady, ResultErr, ResultOk};
1313
use rustc_hir::{Arm, Expr, ExprKind, Node, Pat, PatKind, QPath, UnOp};
1414
use rustc_lint::LateContext;
15-
use rustc_middle::ty::{self, subst::GenericArgKind, DefIdTree, Ty};
15+
use rustc_middle::ty::{self, subst::GenericArgKind, Ty};
1616
use rustc_span::{sym, Symbol};
1717

1818
pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {

0 commit comments

Comments
 (0)