Skip to content

Raise required compiler to Rust 1.68#526

Merged
dtolnay merged 3 commits intomasterfrom
up
Nov 6, 2025
Merged

Raise required compiler to Rust 1.68#526
dtolnay merged 3 commits intomasterfrom
up

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Nov 6, 2025

This version has Cargo's sparse protocol which greatly speeds up CI.

    warning: this could be rewritten as `let...else`
       --> src/parse.rs:183:9
        |
    183 | /         let first = match input.bytes().next() {
    184 | |             Some(first) => first,
    185 | |             None => match stack.last() {
    186 | |                 None => return Ok(trees.build()),
    ...   |
    195 | |             },
    196 | |         };
        | |__________^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
        = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
    help: consider writing
        |
    183 ~         let Some(first) = input.bytes().next() else { match stack.last() {
    184 +                 None => return Ok(trees.build()),
    185 +                 #[cfg(span_locations)]
    186 +                 Some((lo, _frame)) => {
    187 +                     return Err(LexError {
    188 +                         span: Span { lo: *lo, hi: *lo },
    189 +                     })
    190 +                 }
    191 +                 #[cfg(not(span_locations))]
    192 +                 Some(_frame) => return Err(LexError { span: Span {} }),
    193 +             } };
        |

    warning: this could be rewritten as `let...else`
       --> src/parse.rs:216:13
        |
    216 | /             let frame = match stack.pop() {
    217 | |                 Some(frame) => frame,
    218 | |                 None => return Err(lex_error(input)),
    219 | |             };
        | |______________^ help: consider writing: `let Some(frame) = stack.pop() else { return Err(lex_error(input)) };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> src/parse.rs:898:5
        |
    898 | /     let first = match chars.next() {
    899 | |         Some(ch) => ch,
    900 | |         None => {
    901 | |             return Err(Reject);
    902 | |         }
    903 | |     };
        | |______^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
    help: consider writing
        |
    898 ~     let Some(first) = chars.next() else {
    899 +             return Err(Reject);
    900 +         };
        |

    warning: this could be rewritten as `let...else`
       --> tests/test.rs:787:5
        |
    787 | /     let punct = match stream.into_iter().next().unwrap() {
    788 | |         TokenTree::Punct(punct) => punct,
    789 | |         _ => unreachable!(),
    790 | |     };
        | |______^ help: consider writing: `let TokenTree::Punct(punct) = stream.into_iter().next().unwrap() else { unreachable!() };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
        = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
@dtolnay dtolnay merged commit 2942447 into master Nov 6, 2025
26 checks passed
@dtolnay dtolnay deleted the up branch November 6, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant