diff options
| author | Bryanskiy <ivakin.kir@gmail.com> | 2025-08-19 21:34:33 +0300 |
|---|---|---|
| committer | Bryanskiy <ivakin.kir@gmail.com> | 2025-09-10 15:08:06 +0300 |
| commit | bd089e1e6e52256c0535f19f58b4b6fe9609b70c (patch) | |
| tree | 1b9f8a41f2e7ce7bd3a50a22fe41425e001fb78d /compiler/rustc_lint | |
| parent | 7ad23f43a225546c095123de52cc07d8719f8e2b (diff) | |
| download | rust-bd089e1e6e52256c0535f19f58b4b6fe9609b70c.tar.gz rust-bd089e1e6e52256c0535f19f58b4b6fe9609b70c.zip | |
Default auto traits: revert to the default supertraits
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/multiple_supertrait_upcastable.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs index 5513c703f1d..93f067d0983 100644 --- a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs +++ b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs @@ -47,7 +47,8 @@ impl<'tcx> LateLintPass<'tcx> for MultipleSupertraitUpcastable { .explicit_super_predicates_of(def_id) .iter_identity_copied() .filter_map(|(pred, _)| pred.as_trait_clause()) - .filter(|pred| !cx.tcx.is_lang_item(pred.def_id(), hir::LangItem::MetaSized)); + .filter(|pred| !cx.tcx.is_lang_item(pred.def_id(), hir::LangItem::MetaSized)) + .filter(|pred| !cx.tcx.is_default_trait(pred.def_id())); if direct_super_traits_iter.count() > 1 { cx.emit_span_lint( MULTIPLE_SUPERTRAIT_UPCASTABLE, |
