Skip to content

Commit da07053

Browse files
authored
Rollup merge of #105681 - tshepang:doc-mir-visit, r=Nilstrieb
some fixes/improvements to mir::visit module
2 parents 258a0fb + 5a7e8f8 commit da07053

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_middle/src/mir/visit.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
//! ## Overview
44
//!
55
//! There are two visitors, one for immutable and one for mutable references,
6-
//! but both are generated by the following macro. The code is written according
7-
//! to the following conventions:
6+
//! but both are generated by the `make_mir_visitor` macro.
7+
//! The code is written according to the following conventions:
88
//!
99
//! - introduce a `visit_foo` and a `super_foo` method for every MIR type
1010
//! - `visit_foo`, by default, calls `super_foo`
1111
//! - `super_foo`, by default, destructures the `foo` and calls `visit_foo`
1212
//!
13-
//! This allows you as a user to override `visit_foo` for types are
14-
//! interested in, and invoke (within that method) call
13+
//! This allows you to override `visit_foo` for types you are
14+
//! interested in, and invoke (within that method call)
1515
//! `self.super_foo` to get the default behavior. Just as in an OO
1616
//! language, you should never call `super` methods ordinarily except
1717
//! in that circumstance.

0 commit comments

Comments
 (0)