mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 17:44:28 +00:00
Suggest usize instead of placeholder type for array length constants Fixes rust-lang/rust#159487 This PR makes the type suggestion for a anonymous constant used as an array length or repeat expression less generic: usize instead of placeholder type. I divided the work in several commits so I could track my own progress and test my understanding. I could squash them all into one if needed. Some ideas were pulled from rust-lang/rust#160155 , which is why the PR might look similar. That said I only used it as reference when I got stuck, because I was prioritizing my own learning instead of just quickly pushing the changes (hence, many commits).