Add fundamental to trait def

This commit is contained in:
Michael Goulet 2024-07-06 18:16:02 -04:00
parent 382148d9a2
commit b2e30bdec4
3 changed files with 9 additions and 2 deletions

View file

@ -666,7 +666,7 @@ pub fn trait_ref_is_local_or_fundamental<'tcx>(
tcx: TyCtxt<'tcx>,
trait_ref: ty::TraitRef<'tcx>,
) -> bool {
trait_ref.def_id.is_local() || tcx.has_attr(trait_ref.def_id, sym::fundamental)
trait_ref.def_id.is_local() || tcx.trait_def(trait_ref.def_id).is_fundamental
}
#[derive(Debug, Copy, Clone)]