Remove 3 more unused ObligationCauseCodes
This commit is contained in:
parent
3e769c55b8
commit
ca56739366
@ -370,9 +370,6 @@ pub enum ObligationCauseCode<'tcx> {
|
|||||||
origin_expr: bool,
|
origin_expr: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Constants in patterns must have `Structural` type.
|
|
||||||
ConstPatternStructural,
|
|
||||||
|
|
||||||
/// Computing common supertype in an if expression
|
/// Computing common supertype in an if expression
|
||||||
IfExpression(Box<IfExpressionCause<'tcx>>),
|
IfExpression(Box<IfExpressionCause<'tcx>>),
|
||||||
|
|
||||||
@ -405,9 +402,6 @@ pub enum ObligationCauseCode<'tcx> {
|
|||||||
/// `return` with an expression
|
/// `return` with an expression
|
||||||
ReturnValue(hir::HirId),
|
ReturnValue(hir::HirId),
|
||||||
|
|
||||||
/// Return type of this function
|
|
||||||
ReturnType,
|
|
||||||
|
|
||||||
/// Opaque return type of this function
|
/// Opaque return type of this function
|
||||||
OpaqueReturnType(Option<(Ty<'tcx>, Span)>),
|
OpaqueReturnType(Option<(Ty<'tcx>, Span)>),
|
||||||
|
|
||||||
@ -417,9 +411,6 @@ pub enum ObligationCauseCode<'tcx> {
|
|||||||
/// #[feature(trivial_bounds)] is not enabled
|
/// #[feature(trivial_bounds)] is not enabled
|
||||||
TrivialBound,
|
TrivialBound,
|
||||||
|
|
||||||
/// If `X` is the concrete type of an opaque type `impl Y`, then `X` must implement `Y`
|
|
||||||
OpaqueType,
|
|
||||||
|
|
||||||
AwaitableExpr(hir::HirId),
|
AwaitableExpr(hir::HirId),
|
||||||
|
|
||||||
ForLoopIterator,
|
ForLoopIterator,
|
||||||
|
@ -2592,11 +2592,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||||||
| ObligationCauseCode::MethodReceiver
|
| ObligationCauseCode::MethodReceiver
|
||||||
| ObligationCauseCode::ReturnNoExpression
|
| ObligationCauseCode::ReturnNoExpression
|
||||||
| ObligationCauseCode::UnifyReceiver(..)
|
| ObligationCauseCode::UnifyReceiver(..)
|
||||||
| ObligationCauseCode::OpaqueType
|
|
||||||
| ObligationCauseCode::MiscObligation
|
| ObligationCauseCode::MiscObligation
|
||||||
| ObligationCauseCode::WellFormed(..)
|
| ObligationCauseCode::WellFormed(..)
|
||||||
| ObligationCauseCode::MatchImpl(..)
|
| ObligationCauseCode::MatchImpl(..)
|
||||||
| ObligationCauseCode::ReturnType
|
|
||||||
| ObligationCauseCode::ReturnValue(_)
|
| ObligationCauseCode::ReturnValue(_)
|
||||||
| ObligationCauseCode::BlockTailExpression(..)
|
| ObligationCauseCode::BlockTailExpression(..)
|
||||||
| ObligationCauseCode::AwaitableExpr(_)
|
| ObligationCauseCode::AwaitableExpr(_)
|
||||||
@ -2974,9 +2972,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||||||
"all values live across `{what}` must have a statically known size"
|
"all values live across `{what}` must have a statically known size"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
ObligationCauseCode::ConstPatternStructural => {
|
|
||||||
err.note("constants used for pattern-matching must derive `PartialEq` and `Eq`");
|
|
||||||
}
|
|
||||||
ObligationCauseCode::SharedStatic => {
|
ObligationCauseCode::SharedStatic => {
|
||||||
err.note("shared static variables must have a type that implements `Sync`");
|
err.note("shared static variables must have a type that implements `Sync`");
|
||||||
}
|
}
|
||||||
|
@ -1448,7 +1448,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||||||
| ObligationCauseCode::ExprItemObligation(..)
|
| ObligationCauseCode::ExprItemObligation(..)
|
||||||
| ObligationCauseCode::ExprBindingObligation(..)
|
| ObligationCauseCode::ExprBindingObligation(..)
|
||||||
| ObligationCauseCode::Coercion { .. }
|
| ObligationCauseCode::Coercion { .. }
|
||||||
| ObligationCauseCode::OpaqueType
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// constrain inference variables a bit more to nested obligations from normalize so
|
// constrain inference variables a bit more to nested obligations from normalize so
|
||||||
|
Loading…
x
Reference in New Issue
Block a user