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

Regression: FromIterator<TokenStream> is not implemented for TokenStream #49725

Closed
SimonSapin opened this issue Apr 6, 2018 · 3 comments
Closed
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

Servo doesn’t build in today’s Nightly:

error[E0277]: the trait bound `proc_macro::TokenStream: std::iter::FromIterator<proc_macro::TokenStream>` is not satisfied
  --> components/dom_struct/lib.rs:26:53
   |
26 |     iter::once(attributes).chain(iter::once(input)).collect()
   |                                                     ^^^^^^^ a collection of type `proc_macro::TokenStream` cannot be built from an iterator over elements of type `proc_macro::TokenStream`
   |
   = help: the trait `std::iter::FromIterator<proc_macro::TokenStream>` is not implemented for `proc_macro::TokenStream`
error: aborting due to previous error

Since the TokenStream type is stable I think this is a breaking change.

CC @alexcrichton for #49597.

@SimonSapin SimonSapin added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Apr 6, 2018
@nox
Copy link
Contributor

nox commented Apr 6, 2018

The type is stable, but that impl is unstable.

Edit: just realised that's not the impl in question, just wanted to say that I don't think it's a breaking change with regard to stable.

@nox
Copy link
Contributor

nox commented Apr 6, 2018

@alexcrichton
Copy link
Member

Egad sorry about that! I've posted #49734 to revert this change

alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 6, 2018
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
kennytm added a commit to kennytm/rust that referenced this issue Apr 11, 2018
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants