Repository navigation
1.100 beta crater regression: Name collision with Vec::from_fn #164589
Copy link
Copy link
Closed as not planned
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from stable to beta.
Description
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] | + +++++++++++++++++++++
Presumably regressed in #162685
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from stable to beta.
Activity
apiraino commentedon Oct 20, 2026
cc @EFanZh / @hanna-kruppe since author/reviewer of #162685
nia-e commentedon Oct 20, 2026
Acceptable breakage per today's meeting. Thanks!