add an ObligationCauseCode
we'll use later (ReturnNoExpression
)
This commit is contained in:
parent
27f4b57602
commit
eeb6447bbf
@ -904,6 +904,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
|
|||||||
ObligationCauseCode::StartFunctionType |
|
ObligationCauseCode::StartFunctionType |
|
||||||
ObligationCauseCode::IntrinsicType |
|
ObligationCauseCode::IntrinsicType |
|
||||||
ObligationCauseCode::MethodReceiver |
|
ObligationCauseCode::MethodReceiver |
|
||||||
|
ObligationCauseCode::ReturnNoExpression |
|
||||||
ObligationCauseCode::MiscObligation => {
|
ObligationCauseCode::MiscObligation => {
|
||||||
}
|
}
|
||||||
ObligationCauseCode::SliceOrArrayElem => {
|
ObligationCauseCode::SliceOrArrayElem => {
|
||||||
|
@ -173,6 +173,9 @@ pub enum ObligationCauseCode<'tcx> {
|
|||||||
|
|
||||||
// method receiver
|
// method receiver
|
||||||
MethodReceiver,
|
MethodReceiver,
|
||||||
|
|
||||||
|
// `return` with no expression
|
||||||
|
ReturnNoExpression,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
|
@ -167,6 +167,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> {
|
|||||||
type Lifted = traits::ObligationCauseCode<'tcx>;
|
type Lifted = traits::ObligationCauseCode<'tcx>;
|
||||||
fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) -> Option<Self::Lifted> {
|
fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) -> Option<Self::Lifted> {
|
||||||
match *self {
|
match *self {
|
||||||
|
super::ReturnNoExpression => Some(super::ReturnNoExpression),
|
||||||
super::MiscObligation => Some(super::MiscObligation),
|
super::MiscObligation => Some(super::MiscObligation),
|
||||||
super::SliceOrArrayElem => Some(super::SliceOrArrayElem),
|
super::SliceOrArrayElem => Some(super::SliceOrArrayElem),
|
||||||
super::TupleElem => Some(super::TupleElem),
|
super::TupleElem => Some(super::TupleElem),
|
||||||
@ -489,6 +490,7 @@ impl<'tcx> TypeFoldable<'tcx> for traits::ObligationCauseCode<'tcx> {
|
|||||||
super::StructInitializerSized |
|
super::StructInitializerSized |
|
||||||
super::VariableType(_) |
|
super::VariableType(_) |
|
||||||
super::ReturnType |
|
super::ReturnType |
|
||||||
|
super::ReturnNoExpression |
|
||||||
super::RepeatVec |
|
super::RepeatVec |
|
||||||
super::FieldSized |
|
super::FieldSized |
|
||||||
super::ConstSized |
|
super::ConstSized |
|
||||||
@ -533,6 +535,7 @@ impl<'tcx> TypeFoldable<'tcx> for traits::ObligationCauseCode<'tcx> {
|
|||||||
super::StructInitializerSized |
|
super::StructInitializerSized |
|
||||||
super::VariableType(_) |
|
super::VariableType(_) |
|
||||||
super::ReturnType |
|
super::ReturnType |
|
||||||
|
super::ReturnNoExpression |
|
||||||
super::RepeatVec |
|
super::RepeatVec |
|
||||||
super::FieldSized |
|
super::FieldSized |
|
||||||
super::ConstSized |
|
super::ConstSized |
|
||||||
|
Loading…
Reference in New Issue
Block a user