Skip to content

Commit 7c637e7

Browse files
committed
Ignore new_without_default clippy lint
error: you should consider adding a `Default` implementation for `TokenStream` --> src/fallback.rs:55:5 | 55 | / pub fn new() -> Self { 56 | | TokenStream { 57 | | inner: RcVecBuilder::new().build(), 58 | | } 59 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `-D clippy::new-without-default` implied by `-D clippy::all` help: try adding this | 54 + impl Default for TokenStream { 55 + fn default() -> Self { 56 + Self::new() 57 + } 58 + } | error: you should consider adding a `Default` implementation for `TokenStream` --> src/wrapper.rs:74:5 | 74 | / pub fn new() -> Self { 75 | | if inside_proc_macro() { 76 | | TokenStream::Compiler(DeferredTokenStream::new(proc_macro::TokenStream::new())) 77 | | } else { 78 | | TokenStream::Fallback(fallback::TokenStream::new()) 79 | | } 80 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 73 + impl Default for TokenStream { 74 + fn default() -> Self { 75 + Self::new() 76 + } 77 + } |
1 parent 2d3959c commit 7c637e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
clippy::manual_assert,
103103
clippy::must_use_candidate,
104104
clippy::needless_doctest_main,
105+
clippy::new_without_default,
105106
clippy::return_self_not_must_use,
106107
clippy::shadow_unrelated,
107108
clippy::trivially_copy_pass_by_ref,

0 commit comments

Comments
 (0)