Skip to content

1.100 beta crater regression: Name collision with Vec::from_fn #164589

Closed as not planned

Description

@theemathas

Discovered in the 1.100 beta --release crater run.

[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/main.rs:29:3
[INFO] [stdout]    |
[INFO] [stdout] 28 |     let mut nns: Vec<NeuralNetwork> = Vec::from_fn(
[INFO] [stdout]    |                                       ------------ arguments to this function are incorrect
[INFO] [stdout] 29 |         NUMBER_OF_NNS as u32,
[INFO] [stdout]    |         ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
[INFO] [stdout]    |
[INFO] [stdout] note: associated function defined here
[INFO] [stdout]   --> /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/alloc/src/vec/mod.rs:795:11
[INFO] [stdout] help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
[INFO] [stdout]    |
[INFO] [stdout] 29 |         (NUMBER_OF_NNS as u32).try_into().unwrap(),
[INFO] [stdout]    |         +                    +++++++++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/main.rs:35:4
[INFO] [stdout]    |
[INFO] [stdout] 34 |         Vec::from_fn(
[INFO] [stdout]    |         ------------ arguments to this function are incorrect
[INFO] [stdout] 35 |             NUMBER_OF_BENCHMARK_STOCKS as u32,
[INFO] [stdout]    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
[INFO] [stdout]    |
[INFO] [stdout] note: associated function defined here
[INFO] [stdout]   --> /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/alloc/src/vec/mod.rs:795:11
[INFO] [stdout] help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
[INFO] [stdout]    |
[INFO] [stdout] 35 |             (NUMBER_OF_BENCHMARK_STOCKS as u32).try_into().unwrap(),
[INFO] [stdout]    |             +                                 +++++++++++++++++++++

https://crater-reports.s3.amazonaws.com/beta-release-1.100-3/1.100.0-beta.1%2Bcargoflags=--release/gh/dmyTRUEk.random-walk-capitalization/log.txt

Presumably regressed in #162685

Activity

  1. added
    C-bugCategory: This is a bug.
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    on Oct 19, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 19, 2026
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 19, 2026
  4. apiraino commented on Oct 20, 2026

    @apiraino
    Contributor

    cc @EFanZh / @hanna-kruppe since author/reviewer of #162685

  5. nia-e commented on Oct 20, 2026

    @nia-e
    Member

    Acceptable breakage per today's meeting. Thanks!

  6. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 20, 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-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions