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
This commit is contained in:
David Tolnay 2022-10-24 21:54:41 -07:00
parent f4c1822b93
commit 4c0ddcc84c
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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,