Skip to content

1.99 beta crater regression: "expected item, found keyword let" #162349

Closed as duplicate

Description

@theemathas

This regression was found by the 1.99 crater --release mode run.

[INFO] [stdout] failures:
[INFO] [stdout] 
[INFO] [stdout] ---- src/lib.rs - split_rand_vec_eq (line 43) stdout ----
[INFO] [stdout] error: expected item, found keyword `let`
[INFO] [stdout]   --> src/lib.rs:45:1
[INFO] [stdout]    |
[INFO] [stdout] 45 | let vec = vec![1, 2, 3, 4, 5, 6, 7];
[INFO] [stdout]    | ^^^
[INFO] [stdout]    | |
[INFO] [stdout]    | `let` cannot be used for global variables
[INFO] [stdout]    | help: consider using `static` or `const` instead of `let`
[INFO] [stdout]    |
[INFO] [stdout]    = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
[INFO] [stdout] 
[INFO] [stdout] error: aborting due to 1 previous error
[INFO] [stdout] 
[INFO] [stdout] Couldn't compile the test.
[INFO] [stdout] ---- src/lib.rs - split_rand_hashset_eq (line 72) stdout ----
[INFO] [stdout] error: expected item, found keyword `let`
[INFO] [stdout]   --> src/lib.rs:74:1
[INFO] [stdout]    |
[INFO] [stdout] 74 | let vec = vec![1, 2, 3, 4, 5, 6, 7];
[INFO] [stdout]    | ^^^
[INFO] [stdout]    | |
[INFO] [stdout]    | `let` cannot be used for global variables
[INFO] [stdout]    | help: consider using `static` or `const` instead of `let`
[INFO] [stdout]    |
[INFO] [stdout]    = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
[INFO] [stdout] 
[INFO] [stdout] error: aborting due to 1 previous error
[INFO] [stdout] 
[INFO] [stdout] Couldn't compile the test.
[INFO] [stdout] ---- src/lib.rs - split_rand_vec (line 20) stdout ----
[INFO] [stdout] error: expected item, found keyword `let`
[INFO] [stdout]   --> src/lib.rs:22:1
[INFO] [stdout]    |
[INFO] [stdout] 22 | let vec = vec![1, 2, 3, 4, 5, 6, 7, 8];
[INFO] [stdout]    | ^^^
[INFO] [stdout]    | |
[INFO] [stdout]    | `let` cannot be used for global variables
[INFO] [stdout]    | help: consider using `static` or `const` instead of `let`
[INFO] [stdout]    |
[INFO] [stdout]    = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
[INFO] [stdout] 
[INFO] [stdout] error: aborting due to 1 previous error

Activity

  1. added
    regression-from-stable-to-beta
    C-bug
    E-needs-bisection
    E-needs-mcve
    on Sep 6, 2026
  2. added
    needs-triage
    I-prioritize
    on Sep 6, 2026
  3. kpreid commented on Sep 6, 2026

    @kpreid
    Contributor

    These 3 failing doctests all have last lines which are doc comments:

    ...
    /// assert!(chunked.iter().all(|chunk| chunk.len() <= 3));
    /// /// The elements in the chunks are randomized, so the order may vary.
    /// ```
    pub fn split_rand_vec<T: Clone>(vec: Vec<T>, chunk_size: usize) -> Vec<Vec<T>> {

    This doctest should not parse. So, if this test used to pass, it did so erroneously, perhaps by the doc comment attaching to some item appended to the doctest.

  4. removed
    needs-triage
    on Sep 6, 2026
  5. added a commit that references this issue on Sep 7, 2026
  6. added a commit that references this issue on Sep 7, 2026
  7. removed
    I-prioritize
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugE-needs-bisectionE-needs-mcveregression-from-stable-to-beta

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions