Get LocalDefId from source instead of passing in

This commit is contained in:
Simon Vandel Sillesen
2020-09-19 13:52:55 +02:00
parent b4bdaa14f2
commit d3338dcf4d
2 changed files with 3 additions and 11 deletions

View File

@@ -462,7 +462,7 @@ fn run_optimization_passes<'tcx>(
// The main optimizations that we do on MIR.
let optimizations: &[&dyn MirPass<'tcx>] = &[
&remove_unneeded_drops::RemoveUnneededDrops::new(def_id),
&remove_unneeded_drops::RemoveUnneededDrops,
&match_branches::MatchBranchSimplification,
// inst combine is after MatchBranchSimplification to clean up Ne(_1, false)
&instcombine::InstCombine,