Rollup merge of #72234 - dtolnay:default, r=petrochenkov

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.
This commit is contained in:
Dylan DPC 2020-05-16 12:43:06 +02:00 committed by GitHub
commit 25c91ea206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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};