about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkadmin <julianknodt@gmail.com>2020-08-11 02:36:32 +0000
committerkadmin <julianknodt@gmail.com>2020-08-13 06:59:57 +0000
commit6c0f2a9446f8858e7b0f5725c6487be3edb3b87e (patch)
treeda0ffca4d468229b79182e0b4c07f4b0f20209ed
parenta6c2cb42d0b7ad5bafcd2a9b4784ff6f26763b07 (diff)
downloadrust-6c0f2a9446f8858e7b0f5725c6487be3edb3b87e.tar.gz
rust-6c0f2a9446f8858e7b0f5725c6487be3edb3b87e.zip
Update to actually use transform
-rw-r--r--src/librustc_infer/infer/error_reporting/mod.rs2
-rw-r--r--src/librustc_mir/transform/mod.rs1
-rw-r--r--src/test/mir-opt/matches_reduce_branches.rs3
3 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_infer/infer/error_reporting/mod.rs b/src/librustc_infer/infer/error_reporting/mod.rs
index 063246f79fe..26220698190 100644
--- a/src/librustc_infer/infer/error_reporting/mod.rs
+++ b/src/librustc_infer/infer/error_reporting/mod.rs
@@ -827,7 +827,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
                 ty::GenericParamDefKind::Type { has_default, .. } => {
                     Some((param.def_id, has_default))
                 }
-                ty::GenericParamDefKind::Const => None, // FIXME(const_generics:defaults)
+                ty::GenericParamDefKind::Const { .. } => None, // FIXME(const_generics:defaults)
             })
             .peekable();
         let has_default = {
diff --git a/src/librustc_mir/transform/mod.rs b/src/librustc_mir/transform/mod.rs
index 78deb96f5a9..b84514d1e94 100644
--- a/src/librustc_mir/transform/mod.rs
+++ b/src/librustc_mir/transform/mod.rs
@@ -452,6 +452,7 @@ fn run_optimization_passes<'tcx>(
         &simplify::SimplifyCfg::new("final"),
         &nrvo::RenameReturnPlace,
         &simplify::SimplifyLocals,
+        &match_branches::MatchBranchSimplification,
     ];
 
     let no_optimizations: &[&dyn MirPass<'tcx>] = &[
diff --git a/src/test/mir-opt/matches_reduce_branches.rs b/src/test/mir-opt/matches_reduce_branches.rs
index 6ccdaaf7bc3..2d1a6d8de21 100644
--- a/src/test/mir-opt/matches_reduce_branches.rs
+++ b/src/test/mir-opt/matches_reduce_branches.rs
@@ -1,5 +1,4 @@
-// compile-flags: --emit mir
-// EMIT_MIR matches_reduce_branches.foo.fix_match_arms.diff
+// EMIT_MIR matches_reduce_branches.foo.MatchBranchSimplification.diff
 
 fn foo(bar: Option<()>) {
     if matches!(bar, None) {