diff options
| author | Mohammad Omidvar <mohammad.omt99@yahoo.com> | 2022-12-13 15:05:39 -0800 |
|---|---|---|
| committer | Tshepang Mbambo <tshepang@gmail.com> | 2022-12-14 05:34:09 +0200 |
| commit | 330eef1009744c22cddef372de77a73c49dae1db (patch) | |
| tree | 7ef34b729521bd0272e636e37876b3fbb33b7d99 /src/doc/rustc-dev-guide | |
| parent | 21681af523350125503b038435f77e48fdc8ef1b (diff) | |
| download | rust-330eef1009744c22cddef372de77a73c49dae1db.tar.gz rust-330eef1009744c22cddef372de77a73c49dae1db.zip | |
Replace NoLandingPad with another alive Visitor
The broken reference to the non-existing `NoLandingPad` is replaced by `LocalUseCounter` to fix this document.
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/mir/visitor.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/mir/visitor.md b/src/doc/rustc-dev-guide/src/mir/visitor.md index 5c21d5304ac..1c3ef13bebb 100644 --- a/src/doc/rustc-dev-guide/src/mir/visitor.md +++ b/src/doc/rustc-dev-guide/src/mir/visitor.md @@ -37,12 +37,10 @@ code that will execute whenever a `foo` is found. If you want to recursively walk the contents of the `foo`, you then invoke the `super_foo` method. (NB. You never want to override `super_foo`.) -A very simple example of a visitor can be found in [`NoLandingPads`]. -That visitor doesn't even require any state: it just visits all -terminators and removes their `unwind` successors. +A very simple example of a visitor can be found in [`LocalUseCounter`]. +By implementing `visit_local` method, this visitor counts how many tims each local is used. -<!--- TODO: Change NoLandingPads. [#1232](https://github.com/rust-lang/rustc-dev-guide/issues/1232) --> -[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/no_landing_pads/struct.NoLandingPads.html +[`LocalUseCounter`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_transform/simplify_try/struct.LocalUseCounter.html ## Traversal |
