1
Fork 0

Do not rely on type_var_origin in OrphanCheckErr::NonLocalInputType

This commit is contained in:
Michael Goulet 2025-03-20 01:59:38 +00:00
parent 2947be7af8
commit 220851cc75
6 changed files with 60 additions and 64 deletions

View file

@ -4,7 +4,8 @@ use std::ops::ControlFlow;
use derive_where::derive_where;
use rustc_type_ir::inherent::*;
use rustc_type_ir::{
self as ty, InferCtxtLike, Interner, TypeVisitable, TypeVisitableExt, TypeVisitor,
self as ty, InferCtxtLike, Interner, TrivialTypeTraversalImpls, TypeVisitable,
TypeVisitableExt, TypeVisitor,
};
use tracing::instrument;
@ -95,6 +96,8 @@ pub fn trait_ref_is_local_or_fundamental<I: Interner>(tcx: I, trait_ref: ty::Tra
trait_ref.def_id.is_local() || tcx.trait_is_fundamental(trait_ref.def_id)
}
TrivialTypeTraversalImpls! { IsFirstInputType, }
#[derive(Debug, Copy, Clone)]
pub enum IsFirstInputType {
No,