Skip to content
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

Merged
merged 2 commits into from
Oct 26, 2021
Merged

Conversation

yanok
Copy link
Contributor

@yanok yanok commented Oct 23, 2021

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 #90063

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
@rust-highfive
Copy link
Collaborator

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2021
@scottmcm scottmcm assigned scottmcm and unassigned kennytm Oct 23, 2021
Copy link
Member

@scottmcm scottmcm left a 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

@scottmcm scottmcm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2021
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
@yanok
Copy link
Contributor Author

yanok commented Oct 24, 2021

@rustbot label: +S-waiting-on-review -S-waiting-on-author

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 24, 2021
@scottmcm
Copy link
Member

Thanks for the updates! This looks great.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 25, 2021

📌 Commit f3795e2 has been approved by scottmcm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 25, 2021
…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
@bors bors merged commit 14931b9 into rust-lang:master Oct 26, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

traverse_inorder example in ControlFlow compiles, but can't be called
6 participants