about summary refs log tree commit diff
path: root/src/librustc/traits
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-04-12 20:36:13 +0200
committerGitHub <noreply@github.com>2019-04-12 20:36:13 +0200
commit2bc127dcc7f97cdbf5950ed461b05f60f198c278 (patch)
tree5c7d4cd8885dbd807ae7af4ddf316586d8f47561 /src/librustc/traits
parent8f111951a19ab5e63ac347b2d029216c4e061cd4 (diff)
parent16592f691b71802f8876a4f087cdc22a21869836 (diff)
downloadrust-2bc127dcc7f97cdbf5950ed461b05f60f198c278.tar.gz
rust-2bc127dcc7f97cdbf5950ed461b05f60f198c278.zip
Rollup merge of #59859 - davidtwco:issue-59756, r=cramertj
Suggest removing `?` to resolve type errors.

Fixes #59756.
Diffstat (limited to 'src/librustc/traits')
-rw-r--r--src/librustc/traits/mod.rs1
-rw-r--r--src/librustc/traits/structural_impls.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs
index d91c08b070a..b875bfdfa9f 100644
--- a/src/librustc/traits/mod.rs
+++ b/src/librustc/traits/mod.rs
@@ -226,6 +226,7 @@ pub enum ObligationCauseCode<'tcx> {
         source: hir::MatchSource,
         prior_arms: Vec<Span>,
         last_ty: Ty<'tcx>,
+        discrim_hir_id: hir::HirId,
     },
 
     /// Computing common supertype in the pattern guard for the arms of a match expression
diff --git a/src/librustc/traits/structural_impls.rs b/src/librustc/traits/structural_impls.rs
index f3a800bf46d..0711f3539e5 100644
--- a/src/librustc/traits/structural_impls.rs
+++ b/src/librustc/traits/structural_impls.rs
@@ -519,6 +519,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> {
                 source,
                 ref prior_arms,
                 last_ty,
+                discrim_hir_id,
             } => {
                 tcx.lift(&last_ty).map(|last_ty| {
                     super::MatchExpressionArm {
@@ -526,6 +527,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> {
                         source,
                         prior_arms: prior_arms.clone(),
                         last_ty,
+                        discrim_hir_id,
                     }
                 })
             }