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:
bors 2017-07-24 04:59:46 +00:00
commit 9a70c3a372

View File

@ -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,