File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ visit_noop!(bigdecimal::BigDecimal);
182182/// ```
183183pub trait Visitor {
184184 /// 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.
185189 type Break ;
186190
187191 /// Invoked for any queries that appear in the AST before visiting children
@@ -290,6 +294,10 @@ pub trait Visitor {
290294/// ```
291295pub trait VisitorMut {
292296 /// 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.
293301 type Break ;
294302
295303 /// Invoked for any queries that appear in the AST before visiting children
You can’t perform that action at this time.
0 commit comments