Inconsistency between Display and IntoIterator for a TokenStream containing a module #47627
Labels
A-macros-2.0
Area: Declarative macros 2.0 (#39412)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following crate reproduces the issue. Given an attribute macro on a mod item like
#[...] mod module;
, iterating over the tokens of the TokenStream producesmod module;
but invoking to_string() on the TokenStream producesmod module { /* the contents */ }
. I don't know which one is correct but they should be consistent.@jseyfried
Cargo.toml
src/main.rs
src/module.rs
src/lib.rs
Output
The text was updated successfully, but these errors were encountered: