Skip to content

Commit 03a2dc3

Browse files
committed
move note
1 parent 6419cbd commit 03a2dc3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ast/visitor.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ visit_noop!(bigdecimal::BigDecimal);
124124
/// node and `post_visit_` methods are invoked after visiting all
125125
/// children of the node.
126126
///
127-
/// Important note: The `Break` type should be kept as small as possible to prevent
128-
/// stack overflow during recursion. If you need to return an error, consider
129-
/// boxing it with `Box` to minimize stack usage.
130-
///
131127
/// # See also
132128
///
133129
/// These methods provide a more concise way of visiting nodes of a certain type:
@@ -186,6 +182,10 @@ visit_noop!(bigdecimal::BigDecimal);
186182
/// ```
187183
pub trait Visitor {
188184
/// Type returned when the recursion returns early.
185+
///
186+
/// Important note: The `Break` type should be kept as small as possible to prevent
187+
/// stack overflow during recursion. If you need to return an error, consider
188+
/// boxing it with `Box` to minimize stack usage.
189189
type Break;
190190

191191
/// Invoked for any queries that appear in the AST before visiting children
@@ -255,10 +255,6 @@ pub trait Visitor {
255255
/// node and `post_visit_` methods are invoked after visiting all
256256
/// children of the node.
257257
///
258-
/// Important note: The `Break` type should be kept as small as possible to prevent
259-
/// stack overflow during recursion. If you need to return an error, consider
260-
/// boxing it with `Box` to minimize stack usage.
261-
///
262258
/// # See also
263259
///
264260
/// These methods provide a more concise way of visiting nodes of a certain type:
@@ -298,6 +294,10 @@ pub trait Visitor {
298294
/// ```
299295
pub trait VisitorMut {
300296
/// Type returned when the recursion returns early.
297+
///
298+
/// Important note: The `Break` type should be kept as small as possible to prevent
299+
/// stack overflow during recursion. If you need to return an error, consider
300+
/// boxing it with `Box` to minimize stack usage.
301301
type Break;
302302

303303
/// Invoked for any queries that appear in the AST before visiting children

0 commit comments

Comments
 (0)