]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/_match.rs
Auto merge of #30064 - fhartwig:macro-suggestions, r=sanxiyn
[rust.git] / src / librustc_typeck / check / _match.rs
index aaaca48600661878662050f31c608c3232611904..5ffe34d61bf7d72243f3d9a70997cd3e0d779fa4 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use middle::def;
-use middle::infer;
+use middle::infer::{self, TypeOrigin};
 use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding};
 use middle::pat_util::pat_is_resolved_const;
 use middle::privacy::{AllPublic, LastMod};
@@ -509,12 +509,12 @@ pub fn check_match<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                 /* if-let construct without an else block */
                 hir::MatchSource::IfLetDesugar { contains_else_clause }
                 if !contains_else_clause => (
-                    infer::IfExpressionWithNoElse(expr.span),
+                    TypeOrigin::IfExpressionWithNoElse(expr.span),
                     bty,
                     result_ty,
                 ),
                 _ => (
-                    infer::MatchExpressionArm(expr.span, arm.body.span, match_src),
+                    TypeOrigin::MatchExpressionArm(expr.span, arm.body.span, match_src),
                     result_ty,
                     bty,
                 ),