Skip to content

Commit

Permalink
Rollup merge of #72234 - dtolnay:default, r=petrochenkov
Browse files Browse the repository at this point in the history
Implement Default for proc_macro::TokenStream

Hopefully this is uncontroversial. The only reason we've made it this far without is that proc-macro2 snuck this in for their TokenStream.
  • Loading branch information
Dylan-DPC committed May 16, 2020
2 parents 8b1cc10 + d5ea925 commit 25c91ea
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 25c91ea

Please sign in to comment.