Update to actually use transform
This commit is contained in:
parent
a6c2cb42d0
commit
6c0f2a9446
3 changed files with 3 additions and 3 deletions
|
@ -827,7 +827,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
ty::GenericParamDefKind::Type { has_default, .. } => {
|
ty::GenericParamDefKind::Type { has_default, .. } => {
|
||||||
Some((param.def_id, 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();
|
.peekable();
|
||||||
let has_default = {
|
let has_default = {
|
||||||
|
|
|
@ -452,6 +452,7 @@ fn run_optimization_passes<'tcx>(
|
||||||
&simplify::SimplifyCfg::new("final"),
|
&simplify::SimplifyCfg::new("final"),
|
||||||
&nrvo::RenameReturnPlace,
|
&nrvo::RenameReturnPlace,
|
||||||
&simplify::SimplifyLocals,
|
&simplify::SimplifyLocals,
|
||||||
|
&match_branches::MatchBranchSimplification,
|
||||||
];
|
];
|
||||||
|
|
||||||
let no_optimizations: &[&dyn MirPass<'tcx>] = &[
|
let no_optimizations: &[&dyn MirPass<'tcx>] = &[
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// compile-flags: --emit mir
|
// EMIT_MIR matches_reduce_branches.foo.MatchBranchSimplification.diff
|
||||||
// EMIT_MIR matches_reduce_branches.foo.fix_match_arms.diff
|
|
||||||
|
|
||||||
fn foo(bar: Option<()>) {
|
fn foo(bar: Option<()>) {
|
||||||
if matches!(bar, None) {
|
if matches!(bar, None) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue