Skip to content

Commit 1211eeb

Browse files
momvarttshepang
authored andcommitted
Replace NoLandingPad with another alive MIR pass
The broken reference to `NoLandingPad` is replaced by `RemoveStorageMarkers` to fix this document.
1 parent 9f3efe6 commit 1211eeb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mir/passes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ basically consists of one method, `run_pass`, that simply gets an
3333
came from). The MIR is therefore modified in place (which helps to
3434
keep things efficient).
3535

36-
A good example of a basic MIR pass is [`NoLandingPads`], which walks
37-
the MIR and removes all edges that are due to unwinding – this is
38-
used when configured with `panic=abort`, which never unwinds. As you
36+
A basic example of a MIR pass is [`RemoveStorageMarkers`], which walks
37+
the MIR and removes all storage marks if they won't be emitted during codegen. As you
3938
can see from its source, a MIR pass is defined by first defining a
4039
dummy type, a struct with no fields, something like:
4140

@@ -98,5 +97,5 @@ alternatives in [rust-lang/rust#41710].
9897
[rust-lang/rust#41710]: https://github.com/rust-lang/rust/issues/41710
9998
[mirtransform]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/
10099
<!--- TODO: Change NoLandingPads. [#1232](https://github.com/rust-lang/rustc-dev-guide/issues/1232) -->
101-
[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/no_landing_pads/struct.NoLandingPads.html
100+
[`RemoveStorageMarkers`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/remove_storage_markers/struct.RemoveStorageMarkers.html
102101
[MIR visitor]: ./visitor.html

0 commit comments

Comments
 (0)