diff options
| author | bors <bors@rust-lang.org> | 2022-03-24 20:22:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-24 20:22:27 +0000 |
| commit | 63b8f01bb5ca277e7df8d7efe094ed4244c1790c (patch) | |
| tree | f4246d5d6dda964e54872e7cc58af2c7fe6b74ff /compiler/rustc_mir_transform/src/lib.rs | |
| parent | 4b133a7e27c32e822e9ff774e4436f184f5a9752 (diff) | |
| parent | 440946af11391c50cda9f691fda0a507981d0268 (diff) | |
| download | rust-63b8f01bb5ca277e7df8d7efe094ed4244c1790c.tar.gz rust-63b8f01bb5ca277e7df8d7efe094ed4244c1790c.zip | |
Auto merge of #94934 - Lireer:const-prop-lint, r=oli-obk
Separate const prop lints from optimizations r? `@oli-obk` Separates lints and optimizations during const prop by moving the lints into their own file and checking them during post borrowck cleanup. Thanks to `@oli-obk` for mentoring me.
Diffstat (limited to 'compiler/rustc_mir_transform/src/lib.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index 3b2332a6e31..45b8febf9f6 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -49,6 +49,7 @@ pub mod cleanup_post_borrowck; mod const_debuginfo; mod const_goto; mod const_prop; +mod const_prop_lint; mod coverage; mod deaggregator; mod deduplicate_blocks; @@ -430,6 +431,7 @@ fn run_post_borrowck_cleanup_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tc // `Deaggregator` is conceptually part of MIR building, some backends rely on it happening // and it can help optimizations. &deaggregator::Deaggregator, + &Lint(const_prop_lint::ConstProp), ]; pm::run_passes(tcx, body, post_borrowck_cleanup); |
