Will panic due to use of mem::uninitialized in fixed_array.rs
- Dominant language
- Rust
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hello! I'm coming to this repo from https://github.com/rust-lang/rust/pull/99389 where this crate panicked under a stricter check for mem::uninitialized().
The best way to handle this would be to use https://doc.rust-lang.org/std/mem/union.MaybeUninit.html and initialize a MaybeUninit of the array, then, at the end, call `assume_init` on it. I'd be happy to help with this.
Or, for more up to date version of rust, see https://doc.rust-lang.org/std/array/fn.from_fn.html which is becoming stable soon.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading fixed_array.rs and the linked Rust documentation for MaybeUninit and array::from_fn. Compare the current mem::uninitialized path with the proposed initialization approach. Done means fixed_array.rs no longer relies on mem::uninitialized and the panic described in the issue is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100