Skip to content

Commit

Permalink
Merge pull request #177 from ivanbakel/cloneable_intoiter
Browse files Browse the repository at this point in the history
Make TokenStream's IntoIter derive Clone
  • Loading branch information
dtolnay authored May 8, 2019
2 parents 79c8ed7 + f6754d3 commit 1ef4d12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ pub mod token_stream {
///
/// The iteration is "shallow", e.g. the iterator doesn't recurse into
/// delimited groups, and returns whole groups as token trees.
#[derive(Clone)]
pub struct IntoIter {
inner: imp::TokenTreeIter,
_marker: marker::PhantomData<Rc<()>>,
Expand Down
1 change: 1 addition & 0 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ impl fmt::Debug for LexError {
}
}

#[derive(Clone)]
pub enum TokenTreeIter {
Compiler(proc_macro::token_stream::IntoIter),
Fallback(fallback::TokenTreeIter),
Expand Down

0 comments on commit 1ef4d12

Please sign in to comment.