Refactor AliasTy & AliasTerm to use Alias#156538
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a630681 to
89cd50d
Compare
|
can you say more about the errors you had to work around? this feels odd to me and something we should fix in the derives instead of requiring manual impls here imo |
| )] | ||
| pub struct AliasTy<I: Interner> { | ||
| /// The parameters of the associated or opaque type. | ||
| pub struct Alias<I: Interner, K> { |
There was a problem hiding this comment.
can you move Alias and AliasTerm in a separate rustc_type_ir/ty/alias module?
| } | ||
|
|
||
| impl<I: Interner> Eq for NormalizesTo<I> {} | ||
| impl<I: Interner, K: PartialEq> Eq for NormalizesTo<I, K> {} |
There was a problem hiding this comment.
why not derive_where for Eq? that might be outdated and no longer necessary thanks to ModProg/derive-where#137
|
I've whittled it down to only a manual (comments omitted for brevity) #[derive_where(Clone, Copy, Hash, PartialEq, Debug; I: Interner, K)]
#[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)]
#[cfg_attr(
feature = "nightly",
derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext)
)]
pub struct Alias<I: Interner, K> {
pub args: I::GenericArgs,
pub kind: K,
#[derive_where(skip(Debug))]
#[type_visitable(ignore)]
#[type_foldable(identity)]
pub(crate) _use_alias_new_instead: (),
}I get 2000+ errors of which fall into the following; A sample of errors being; And so on... This was similar to |
|
The job Click to see the possible cause of the failure (guessed by this bot)For more information how to resolve CI failures of this job, visit this link. |
Refactors
AliasTy&AliasTermto useAlias. To move around errors I had to manually implementLift,TypeVisitableandTypeFoldablePart of #156181
r? @lcnr