-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove TokenStream::JointTree
.
#56964
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
After these commits,
I wonder if the recursion via the
To break it down further, perhaps
(Possibly with the use of There's a comment at the top of
|
More that that, |
@petrochenkov: I tried looking at those public interfaces but I'm having trouble understanding them, particularly the |
Oh, there's the bridge thing now. |
(libproc_macro was much more straightforward and closer to its "conceptual" form before all that machinery for client-server communication was added.) |
You can still look at the public API, IMO, it's not like the old code was self-contained.
|
r=me with #56964 (comment) addressed. |
✌️ @nnethercote can now approve this pull request |
This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
50eff25
to
e7c5146
Compare
@bors r=petrochenkov |
📌 Commit e7c5146 has been approved by |
Perhaps it's more like this: At least, that's the case for any |
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
Rollup of 20 pull requests Successful merges: - #56802 (Add DoubleEndedIterator::nth_back) - #56842 (Add unstable VecDeque::rotate_{left|right}) - #56869 (Reduce search-index.js size) - #56887 (Disable field reordering for repr(int).) - #56892 (rustc: Update Clang used to build LLVM on Linux) - #56909 (static eval: Do not ICE on layout size overflow) - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le) - #56917 (Simplify MIR generation for logical operations) - #56919 (Remove a wrong multiplier on relocation offset computation) - #56933 (Add --progress to git submodule commands in x.py) - #56941 (deny intra-doc link resolution failures in libstd) - #56964 (Remove `TokenStream::JointTree`.) - #56970 (Mem uninit doc ptr drop) - #56973 (make basic CTFE tracing available on release builds) - #56979 (Adding unwinding support for x86_64_fortanix_unknown_sgx target.) - #56981 (miri: allocation is infallible) - #56984 (A few tweaks to dropck_outlives) - #56989 (Fix compiletest `trim` deprecation warnings) - #56992 (suggest similar lint names for unknown lints) - #57002 (Stabilize Vec(Deque)::resize_with) Failed merges: r? @ghost
Rollup of 20 pull requests Successful merges: - #56802 (Add DoubleEndedIterator::nth_back) - #56842 (Add unstable VecDeque::rotate_{left|right}) - #56869 (Reduce search-index.js size) - #56887 (Disable field reordering for repr(int).) - #56892 (rustc: Update Clang used to build LLVM on Linux) - #56909 (static eval: Do not ICE on layout size overflow) - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le) - #56917 (Simplify MIR generation for logical operations) - #56919 (Remove a wrong multiplier on relocation offset computation) - #56933 (Add --progress to git submodule commands in x.py) - #56941 (deny intra-doc link resolution failures in libstd) - #56964 (Remove `TokenStream::JointTree`.) - #56970 (Mem uninit doc ptr drop) - #56973 (make basic CTFE tracing available on release builds) - #56979 (Adding unwinding support for x86_64_fortanix_unknown_sgx target.) - #56981 (miri: allocation is infallible) - #56984 (A few tweaks to dropck_outlives) - #56989 (Fix compiletest `trim` deprecation warnings) - #56992 (suggest similar lint names for unknown lints) - #57002 (Stabilize Vec(Deque)::resize_with) Failed merges: r? @ghost
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
Rollup of 10 pull requests Successful merges: - #56188 (enum type instead of variant suggestion unification ) - #56916 (Fix mutable references in `static mut`) - #56917 (Simplify MIR generation for logical operations) - #56953 (Mark tuple structs as live if their constructors are used) - #56964 (Remove `TokenStream::JointTree`.) - #56966 (Correct strings for raw pointer deref and array access suggestions) - #56999 (AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-end) - #57020 (Point to cause of `fn` expected return type) - #57032 (fix deprecation warnings in liballoc benches) - #57053 (Fix alignment for array indexing) Failed merges: r? @ghost
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
Rollup of 14 pull requests Successful merges: - #56188 (enum type instead of variant suggestion unification ) - #56342 (Improve docs for collecting into `Option`s) - #56916 (Fix mutable references in `static mut`) - #56917 (Simplify MIR generation for logical operations) - #56939 (Pin stabilization) - #56953 (Mark tuple structs as live if their constructors are used) - #56964 (Remove `TokenStream::JointTree`.) - #56966 (Correct strings for raw pointer deref and array access suggestions) - #57020 (Point to cause of `fn` expected return type) - #57032 (fix deprecation warnings in liballoc benches) - #57053 (Fix alignment for array indexing) - #57062 (Fix a comment) - #57067 (Stabilize min_const_unsafe_fn in 1.33) - #57078 (Ignore two tests on s390x) Failed merges: r? @ghost
This is done by adding a new
IsJoint
field toTokenStream::Tree
,which simplifies a lot of
match
statements. And likewise forCursorKind
.The commit also adds a new method
TokenTree:stream()
which can replacea choice between
.into()
and.joint()
.