mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
6f7fa03a06
Use Option's discriminant as its size hint I was looking at this in MIR after a question on discord, and noticed that it ends up with a switch in MIR (<https://rust.godbolt.org/z/3q4cYnnb3>), which it doesn't need because (as `Option::as_slice` uses) the discriminant is already the length. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |