@@ -53,19 +53,19 @@ this pass into the appropriate list of passes found in a query like
53
53
` mir_built ` , ` optimized_mir ` , etc. (If this is an optimization, it
54
54
should go into the ` optimized_mir ` list.)
55
55
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
57
57
the MIR and removes all statements that are not relevant to code generation. As you can see from
58
58
its [ source] [ cleanup-source ] , it is defined by first defining a dummy type, a struct with no
59
59
fields:
60
60
61
61
``` rust
62
- pub struct CleanupNonCodegenStatements ;
62
+ pub struct CleanupPostBorrowck ;
63
63
```
64
64
65
65
for which we implement the ` MirPass ` trait:
66
66
67
67
``` rust
68
- impl <'tcx > MirPass <'tcx > for CleanupNonCodegenStatements {
68
+ impl <'tcx > MirPass <'tcx > for CleanupPostBorrowck {
69
69
fn run_pass (& self , tcx : TyCtxt <'tcx >, body : & mut Body <'tcx >) {
70
70
...
71
71
}
@@ -172,11 +172,11 @@ simply loads from a cache the second time).
172
172
[ lint1 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/check_packed_ref/struct.CheckPackedRef.html
173
173
[ lint2 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/check_const_item_mutation/struct.CheckConstItemMutation.html
174
174
[ 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
176
176
[ opt2 ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/remove_unneeded_drops/struct.RemoveUnneededDrops.html
177
177
[ mirtransform ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/
178
178
[ `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
180
180
[ cleanup-source ] : https://github.com/rust-lang/rust/blob/e2b52ff73edc8b0b7c74bc28760d618187731fe8/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs#L27
181
181
[ pass-register ] : https://github.com/rust-lang/rust/blob/e2b52ff73edc8b0b7c74bc28760d618187731fe8/compiler/rustc_mir_transform/src/lib.rs#L413
182
182
[ MIR visitor ] : ./visitor.html
0 commit comments