-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
proc_macro: Generalize FromIterator
impl
#49734
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
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.
Can we get away with
impl FromIterator<TokenTree> for TokenStream
impl FromIterator<TokenStream> for TokenStream
for now instead of dealing with T: Into<TokenStream>
?
@dtolnay we could try yeah but it would still be a technical breaking change due to custom From impls. |
maybe worth a try though |
To be clear, I filed #49725 to make sure we deal with it knowingly in case other projects are impacted, but I don’t mind if the resolution is "no change". It’s an easy fix for Servo, and that crate is not part of the subset used by Firefox that needs to build on the Stable channel. |
While never intended to be stable we forgot that trait impls are insta-stable! This construction of `FromIterator` wasn't our first choice of how to stabilize the impl but our hands are tied at this point, so revert back to the original definition of `FromIterator` before rust-lang#49597 Closes rust-lang#49725
63dc0a2
to
d985344
Compare
Ok, I've added just |
@alexcrichton did you want to do a crater run or something? |
Not sure what is expected path here |
I'm ok landing this and seeing if there's still any breakage. The damage is already done on nightly so it may be a bit late for a crater run :( |
@bors r+ |
📌 Commit d985344 has been approved by |
…m, r=nikomatsakis proc_macro: Generalize `FromIterator` impl While never intended to be stable we forgot that trait impls are insta-stable! This construction of `FromIterator` wasn't our first choice of how to stabilize the impl but our hands are tied at this point, so revert back to the original definition of `FromIterator` before rust-lang#49597 Closes rust-lang#49725
Rollup of 14 pull requests Successful merges: - #49525 (Use sort_by_cached_key where appropriate) - #49575 (Stabilize `Option::filter`.) - #49614 (in which the non-shorthand patterns lint keeps its own counsel in macros) - #49665 (Small nits to make couple of tests pass on mips targets.) - #49781 (add regression test for #16223 (NLL): use of collaterally moved value) - #49795 (Properly look for uninhabitedness of variants in niche-filling check) - #49809 (Stop emitting color codes on TERM=dumb) - #49856 (Do not uppercase-lint #[no_mangle] statics) - #49863 (fixed typo) - #49857 (Fix "fp" target feature for AArch64) - #49849 (Add --enable-debug flag to musl CI build script) - #49734 (proc_macro: Generalize `FromIterator` impl) - #49730 (Fix ICE with impl Trait) - #48270 (Replace `structurally_resolved_type` in casts check.) Failed merges:
While never intended to be stable we forgot that trait impls are insta-stable!
This construction of
FromIterator
wasn't our first choice of how to stabilizethe impl but our hands are tied at this point, so revert back to the original
definition of
FromIterator
before #49597Closes #49725