Skip to content

Commit 4c516b0

Browse files
momvarttshepang
authored andcommitted
Replace NoLandingPad with another alive Visitor
The broken reference to the non-existing `NoLandingPad` is replaced by `LocalUseCounter` to fix this document.
1 parent 1cf62dd commit 4c516b0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/mir/visitor.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ code that will execute whenever a `foo` is found. If you want to
3737
recursively walk the contents of the `foo`, you then invoke the
3838
`super_foo` method. (NB. You never want to override `super_foo`.)
3939

40-
A very simple example of a visitor can be found in [`NoLandingPads`].
41-
That visitor doesn't even require any state: it just visits all
42-
terminators and removes their `unwind` successors.
40+
A very simple example of a visitor can be found in [`LocalUseCounter`].
41+
By implementing `visit_local` method, this visitor counts how many tims each local is used.
4342

44-
<!--- TODO: Change NoLandingPads. [#1232](https://github.com/rust-lang/rustc-dev-guide/issues/1232) -->
45-
[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/no_landing_pads/struct.NoLandingPads.html
43+
[`LocalUseCounter`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify_try/struct.LocalUseCounter.html
4644

4745
## Traversal
4846

0 commit comments

Comments
 (0)