parse const trait Trait

This commit is contained in:
Deadbeef
2025-07-13 16:49:19 +08:00
parent f8f6997469
commit 69326878ee
94 changed files with 365 additions and 299 deletions

View File

@@ -39,7 +39,7 @@ impl<'tcx> LateLintPass<'tcx> for MultipleSupertraitUpcastable {
let def_id = item.owner_id.to_def_id();
// NOTE(nbdd0121): use `dyn_compatibility_violations` instead of `is_dyn_compatible` because
// the latter will report `where_clause_object_safety` lint.
if let hir::ItemKind::Trait(_, _, ident, ..) = item.kind
if let hir::ItemKind::Trait(_, _, _, ident, ..) = item.kind
&& cx.tcx.is_dyn_compatible(def_id)
{
let direct_super_traits_iter = cx