Skip to content

Commit d5ea925

Browse files
committed
Implement Default for proc_macro::TokenStream
1 parent 85f0da6 commit d5ea925

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libproc_macro/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ impl fmt::Debug for TokenStream {
158158
}
159159
}
160160

161+
#[stable(feature = "proc_macro_token_stream_default", since = "1.45.0")]
162+
impl Default for TokenStream {
163+
fn default() -> Self {
164+
TokenStream::new()
165+
}
166+
}
167+
161168
#[unstable(feature = "proc_macro_quote", issue = "54722")]
162169
pub use quote::{quote, quote_span};
163170

0 commit comments

Comments
 (0)