alexcrichton opened PR #4694 from remove-recursion
to main
:
Sure enough the fuzzers found an input that blows the stack, so the
type-building here was rewritten to use a heap-based stack instead of a
stack-based-stack.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
jameysharp created PR review comment:
I can't read this comment. How about "Otherwise emit a reference to the type and remember to generate the corresponding type alias later"?
jameysharp submitted PR review.
jameysharp created PR review comment:
I guess you might as well consume the vector and drop the partial strings as you go, right?
for decl in type_decls.into_iter().rev() {
jameysharp created PR review comment:
// Note that types are printed here in reverse order since they were
jameysharp submitted PR review.
jameysharp created PR review comment:
I like using
#[derive(Default)]
for this kind of simple case:let mut builder = TypesBuilder::default();
alexcrichton updated PR #4694 from remove-recursion
to main
.
alexcrichton has enabled auto merge for PR #4694.
alexcrichton merged PR #4694.
Last updated: Nov 22 2024 at 17:03 UTC