Feature gate: #![feature(ts_extend_w_tt_item)]
This is a tracking issue for implementation of Extend parameterized over "token tree items" (Group, Literal, Punct, Ident) for TokenStream as proposed by this API Change Proposal (ACP).
In this context, "token tree item" is a stipulative definition that means any of the types that can be stored as variants inside of proc_macro::TokenTree, namely
- proc_macro::Group
- proc_macro::Ident
- proc_macro::Punct
- proc_macro::Literal
Public API
// proc_macro
impl Extend<Group> for TokenStream {
  /*...*/
}
impl Extend<Ident> for TokenStream {
   /*...*/
}
impl Extend<Punct> for TokenStream {
   /*...*/
}
impl Extend<Literal> for TokenStream {
   /*...*/
}Steps / History
Unresolved Questions