File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,10 @@ code that will execute whenever a `foo` is found. If you want to
37
37
recursively walk the contents of the ` foo ` , you then invoke the
38
38
` super_foo ` method. (NB. You never want to override ` super_foo ` .)
39
39
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.
43
42
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
46
44
47
45
## Traversal
48
46
You can’t perform that action at this time.
0 commit comments