Skip to content

Commit

Permalink
Implement Default for proc_macro::TokenStream
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 15, 2020
1 parent 85f0da6 commit d5ea925
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ impl fmt::Debug for TokenStream {
}
}

#[stable(feature = "proc_macro_token_stream_default", since = "1.45.0")]
impl Default for TokenStream {
fn default() -> Self {
TokenStream::new()
}
}

#[unstable(feature = "proc_macro_quote", issue = "54722")]
pub use quote::{quote, quote_span};

Expand Down

0 comments on commit d5ea925

Please sign in to comment.