mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Auto merge of #43280 - lfairy:token-tree-iter-clone, r=nrc
Add #[derive(Clone)] to TokenTreeIter I've found this useful for writing backtracking parsers. The underlying `Cursor` implements `Clone` already, so it's just a matter of adding `#[derive(Clone)]` to the type. r? @jseyfried
This commit is contained in:
commit
9a70c3a372
@ -375,6 +375,7 @@ impl Literal {
|
||||
}
|
||||
|
||||
/// An iterator over `TokenTree`s.
|
||||
#[derive(Clone)]
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
pub struct TokenTreeIter {
|
||||
cursor: tokenstream::Cursor,
|
||||
|
Loading…
Reference in New Issue
Block a user