1
Fork 0

Rollup merge of #137183 - compiler-errors:dead-regionck-code, r=lcnr

Prune dead regionck code

We never encounter `ObligationCauseCode`s that correspond to region obligations that originate from "within" a body, since we don't do HIR regionck anymore on bodies. So prune some dead code.
This commit is contained in:
Matthias Krüger 2025-02-22 11:36:42 +01:00 committed by GitHub
commit 72535fec55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 241 deletions

View file

@ -144,14 +144,6 @@ impl<'tcx> ObligationCause<'tcx> {
}
}
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
#[derive(TypeVisitable, TypeFoldable)]
pub struct UnifyReceiverContext<'tcx> {
pub assoc_item: ty::AssocItem,
pub param_env: ty::ParamEnv<'tcx>,
pub args: GenericArgsRef<'tcx>,
}
/// A compact form of `ObligationCauseCode`.
#[derive(Clone, PartialEq, Eq, Default, HashStable)]
#[derive(TypeVisitable, TypeFoldable, TyEncodable, TyDecodable)]
@ -360,8 +352,6 @@ pub enum ObligationCauseCode<'tcx> {
/// Method receiver
MethodReceiver,
UnifyReceiver(Box<UnifyReceiverContext<'tcx>>),
/// `return` with no expression
ReturnNoExpression,