From 4c0ddcc84ce51a84b57ce54fcfda8893f67dd4a1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 24 Oct 2022 21:54:41 -0700 Subject: [PATCH] Ignore items_after_statements pedantic clippy lint error: adding items after statements is confusing, since items exist from the start of the scope --> src/error.rs:139:9 | 139 | / fn new(span: Span, message: String) -> Error { 140 | | Error { 141 | | messages: vec![ErrorMessage { 142 | | start_span: ThreadBound::new(span), ... | 146 | | } 147 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements = note: `-D clippy::items-after-statements` implied by `-D clippy::pedantic` error: adding items after statements is confusing, since items exist from the start of the scope --> src/error.rs:167:9 | 167 | / fn new_spanned(tokens: TokenStream, message: String) -> Error { 168 | | let mut iter = tokens.into_iter(); 169 | | let start = iter.next().map_or_else(Span::call_site, |t| t.span()); 170 | | let end = iter.last().map_or(start, |t| t.span()); ... | 177 | | } 178 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> src/error.rs:301:5 | 301 | / fn new2(start: Span, end: Span, message: String) -> Error { 302 | | Error { 303 | | messages: vec![ErrorMessage { 304 | | start_span: ThreadBound::new(start), ... | 308 | | } 309 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index d924c0ca..e983410e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -265,6 +265,7 @@ clippy::explicit_auto_deref, clippy::if_not_else, clippy::inherent_to_string, + clippy::items_after_statements, clippy::large_enum_variant, clippy::let_underscore_drop, clippy::manual_assert,