about summary refs log tree commit diff
path: root/src/librustc/traits/structural_impls.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-01-05 17:08:15 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-01-12 19:36:28 -0800
commita873337f2100ffa341f1a03e316ded6bfa2e95f7 (patch)
tree4d958c48ff6af0249c6956681cfbb4aefaef3691 /src/librustc/traits/structural_impls.rs
parentc2d381d39d282c0586d50ea7d7a431ffd5ddb3fb (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.rs3
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),