-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and extent ControlFlow traverse_inorder
example
#90196
Conversation
Fix and extent ControlFlow `traverse_inorder` example 1. The existing example compiles on its own, but any usage fails to be monomorphised and so doesn't compile. Fix that by using Fn trait instead of FnMut. 2. Added an example usage of `traverse_inorder` showing how we can terminate the traversal early. Fixes rust-lang#90063
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the PR, @yanok! I've left some other comments with requested changes.
Once you've made changes and would like me to look at it again, please do @rustbot label: +S-waiting-on-review -S-waiting-on-author
1. The existing example compiles on its own, but any usage fails to be monomorphised and so doesn't compile. Fix that by using a mutable reference as an input argument. 2. Added an example usage of `traverse_inorder` showing how we can terminate the traversal early. Fixes rust-lang#90063
@rustbot label: +S-waiting-on-review -S-waiting-on-author |
Thanks for the updates! This looks great. @bors r+ |
📌 Commit f3795e2 has been approved by |
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#89581 (Add -Z no-unique-section-names to reduce ELF header bloat.) - rust-lang#90196 (Fix and extent ControlFlow `traverse_inorder` example) - rust-lang#90255 (:arrow_up: rust-analyzer) - rust-lang#90266 (Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix and extent ControlFlow
traverse_inorder
exampletraverse_inorder
showing how we can terminate the traversal early.Fixes #90063