Skip to content

Commit 3238806

Browse files
authored
Rollup merge of #93813 - xldenis:public-mir-passes, r=wesleywiser
Make a few cleanup MIR passes public Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Making.20passes.20public.20again This makes a few passes which used to be public, public again. I'd like to use these to clean up MIR code for my external rustc driver. The other option would be to make them all public, but I don't know if that's warranted / useful. r? `@wesleywiser`
2 parents 6db0f9c + c97302e commit 3238806

File tree

1 file changed

+6
-3
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+6
-3
lines changed

compiler/rustc_mir_transform/src/lib.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ mod add_retag;
4343
mod check_const_item_mutation;
4444
mod check_packed_ref;
4545
pub mod check_unsafety;
46-
mod cleanup_post_borrowck;
46+
// This pass is public to allow external drivers to perform MIR cleanup
47+
pub mod cleanup_post_borrowck;
4748
mod const_debuginfo;
4849
mod const_goto;
4950
mod const_prop;
@@ -65,7 +66,8 @@ mod match_branches;
6566
mod multiple_return_terminators;
6667
mod normalize_array_len;
6768
mod nrvo;
68-
mod remove_false_edges;
69+
// This pass is public to allow external drivers to perform MIR cleanup
70+
pub mod remove_false_edges;
6971
mod remove_noop_landing_pads;
7072
mod remove_storage_markers;
7173
mod remove_uninit_drops;
@@ -75,7 +77,8 @@ mod required_consts;
7577
mod reveal_all;
7678
mod separate_const_switch;
7779
mod shim;
78-
mod simplify;
80+
// This pass is public to allow external drivers to perform MIR cleanup
81+
pub mod simplify;
7982
mod simplify_branches;
8083
mod simplify_comparison_integral;
8184
mod simplify_try;

0 commit comments

Comments
 (0)