Skip to content

Commit 1ce3041

Browse files
committed
fixup clippy
1 parent 9eb549f commit 1ce3041

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎compiler/rustc_codegen_cranelift/example/mini_core.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl<'a> BitOr<bool> for &'a bool {
290290
}
291291
}
292292

293-
#[lang = "eq"]
293+
#[lang = "partial_eq"]
294294
pub trait PartialEq<Rhs: ?Sized = Self> {
295295
fn eq(&self, other: &Rhs) -> bool;
296296
fn ne(&self, other: &Rhs) -> bool;

‎compiler/rustc_codegen_gcc/example/mini_core.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a> BitOr<bool> for &'a bool {
346346
}
347347
}
348348

349-
#[lang = "eq"]
349+
#[lang = "partial_eq"]
350350
pub trait PartialEq<Rhs: ?Sized = Self> {
351351
fn eq(&self, other: &Rhs) -> bool;
352352
fn ne(&self, other: &Rhs) -> bool;

‎src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ fn get_callee_generic_args_and_args<'tcx>(
535535

536536
/// Returns all caller bounds in the `ParamEnv` of `def_id`.
537537
fn caller_clauses<'tcx>(cx: &LateContext<'tcx>, def_id: DefId) -> impl Iterator<Item = ty::Clause<'tcx>> {
538-
cx.tcx.param_env(def_id).caller_bounds().all_clauses(cx.tcx).iter()
538+
cx.tcx.param_env(def_id).caller_bounds().all_clauses_interned(cx.tcx).iter()
539539
}
540540

541541
/// Returns the `TraitClause`s and `ProjectionClause`s for a function's input type.

‎src/tools/clippy/clippy_lints/src/useless_conversion.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
352352
.all_clauses(cx.tcx)
353353
.iter()
354354
.any(|clause| {
355-
if let ty::ClauseKind::Trait(trait_pred) = clause.kind().skip_binder() {
355+
if let ty::ClauseKind::Trait(trait_pred) = clause.skip_binder() {
356356
trait_pred.self_ty() == *second_ty
357357
&& cx.tcx.lang_items().fn_mut_trait() == Some(trait_pred.def_id())
358358
} else {

‎src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ pub fn is_min_const_fn<'tcx>(cx: &LateContext<'tcx>, body: &Body<'tcx>, msrv: Ms
4242
.all_clauses(cx.tcx)
4343
.iter()
4444
.any(|bound| {
45-
bound.as_trait_clause().is_some_and(|clause| {
46-
let did = clause.def_id();
47-
did != sized_did && did != meta_sized_did
48-
})
45+
match bound.skip_binder() {
46+
ty::ClauseKind::Trait(clause) => {
47+
let did = clause.def_id();
48+
did != sized_did && did != meta_sized_did
49+
}
50+
_ => false
51+
}
4952
})
5053
{
5154
return Err((

0 commit comments

Comments
 (0)