diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-01-05 17:08:15 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-01-12 19:36:28 -0800 |
| commit | a873337f2100ffa341f1a03e316ded6bfa2e95f7 (patch) | |
| tree | 4d958c48ff6af0249c6956681cfbb4aefaef3691 /src/librustc/traits/structural_impls.rs | |
| parent | c2d381d39d282c0586d50ea7d7a431ffd5ddb3fb (diff) | |
Point at the match discriminant when arm pattern has a type mismatch
Diffstat (limited to 'src/librustc/traits/structural_impls.rs')
| -rw-r--r-- | src/librustc/traits/structural_impls.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc/traits/structural_impls.rs b/src/librustc/traits/structural_impls.rs index ae2b83e1057..277e2ed0e87 100644 --- a/src/librustc/traits/structural_impls.rs +++ b/src/librustc/traits/structural_impls.rs @@ -517,6 +517,9 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> { arm_span, source: source, }), + super::MatchExpressionArmPattern { span, ty } => { + tcx.lift(&ty).map(|ty| super::MatchExpressionArmPattern { span, ty }) + } super::IfExpression => Some(super::IfExpression), super::IfExpressionWithNoElse => Some(super::IfExpressionWithNoElse), super::MainFunctionType => Some(super::MainFunctionType), |
