@@ -53,19 +53,19 @@ this pass into the appropriate list of passes found in a query like
5353` mir_built ` , ` optimized_mir ` , etc. (If this is an optimization, it
5454should go into the ` optimized_mir ` list.)
5555
56- Another example of a simple MIR pass is [ ` CleanupNonCodegenStatements ` ] [ cleanup-pass ] , which walks
56+ Another example of a simple MIR pass is [ ` CleanupPostBorrowck ` ] [ cleanup-pass ] , which walks
5757the MIR and removes all statements that are not relevant to code generation. As you can see from
5858its [ source] [ cleanup-source ] , it is defined by first defining a dummy type, a struct with no
5959fields:
6060
6161``` rust
62- pub struct CleanupNonCodegenStatements ;
62+ pub struct CleanupPostBorrowck ;
6363```
6464
6565for which we implement the ` MirPass ` trait:
6666
6767``` rust
68- impl <'tcx > MirPass <'tcx > for CleanupNonCodegenStatements {
68+ impl <'tcx > MirPass <'tcx > for CleanupPostBorrowck {
6969 fn run_pass (& self , tcx : TyCtxt <'tcx >, body : & mut Body <'tcx >) {
7070 ...
7171 }
@@ -172,11 +172,11 @@ simply loads from a cache the second time).
172172[ lint1 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/check_packed_ref/struct.CheckPackedRef.html
173173[ lint2 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/check_const_item_mutation/struct.CheckConstItemMutation.html
174174[ lint3 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/function_item_references/struct.FunctionItemReferences.html
175- [ opt1 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify/struct .SimplifyCfg.html
175+ [ opt1 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify/enum .SimplifyCfg.html
176176[ opt2 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/remove_unneeded_drops/struct.RemoveUnneededDrops.html
177177[ mirtransform ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/
178178[ `RemoveStorageMarkers` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/remove_storage_markers/struct.RemoveStorageMarkers.html
179- [ cleanup-pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/cleanup_post_borrowck/struct.CleanupNonCodegenStatements .html
179+ [ cleanup-pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/cleanup_post_borrowck/struct.CleanupPostBorrowck .html
180180[ cleanup-source ] : https://github.com/rust-lang/rust/blob/e2b52ff73edc8b0b7c74bc28760d618187731fe8/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs#L27
181181[ pass-register ] : https://github.com/rust-lang/rust/blob/e2b52ff73edc8b0b7c74bc28760d618187731fe8/compiler/rustc_mir_transform/src/lib.rs#L413
182182[ MIR visitor ] : ./visitor.html
0 commit comments