`&Box<[T; N]>` doesn't impl `IntoIterator`
Open
Nobody has claimed this yet.
A-array
A-box
A-iterators
C-enhancement
F-negative_impls
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
pub fn f(v: &Box<[String; 10]>) {
for i in v {
println("{i:?}");
}
}
I expected to see this happen: compiles successfully and iterates over the boxed array.
Instead, this happened:
error[E0277]: `&Box<[String; 10]>` is not an iterator
Meta
rustc --version --verbose: (from playground)
1.97.0-nightly (2026-04-19 e22c616e4e87914135c1)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked Rust Playground example with the reported nightly compiler and compare iteration over &Box<[String; 10]> with related array and reference cases. Trace the compiler or standard-library handling of IntoIterator and confirm the fix by making the example compile and iterate over the boxed array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100