Skip to content

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

Closed
@SimonSapin

Description

@SimonSapin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions