pub mod remove_noop_landing_pads;
pub mod remove_storage_markers;
pub mod remove_unneeded_drops;
+pub mod remove_zsts;
pub mod required_consts;
pub mod rustc_peek;
pub mod simplify;
pub(crate) fn provide(providers: &mut Providers) {
self::check_unsafety::provide(providers);
+ self::check_packed_ref::provide(providers);
*providers = Providers {
mir_keys,
mir_const,
&simplify::SimplifyCfg::new("promote-consts"),
];
- let opt_coverage: &[&dyn MirPass<'tcx>] = if tcx.sess.opts.debugging_opts.instrument_coverage {
- &[&coverage::InstrumentCoverage]
- } else {
- &[]
- };
+ let opt_coverage: &[&dyn MirPass<'tcx>] =
+ if tcx.sess.instrument_coverage() { &[&coverage::InstrumentCoverage] } else { &[] };
run_passes(tcx, &mut body, MirPhase::ConstPromotion, &[promote, opt_coverage]);
// The main optimizations that we do on MIR.
let optimizations: &[&dyn MirPass<'tcx>] = &[
&remove_storage_markers::RemoveStorageMarkers,
+ &remove_zsts::RemoveZsts,
&const_goto::ConstGoto,
&remove_unneeded_drops::RemoveUnneededDrops,
&match_branches::MatchBranchSimplification,