rust/library/core
Matthias Krüger 6f7fa03a06
Rollup merge of #127748 - scottmcm:option_len, r=joboet
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.
2024-07-18 18:10:16 +02:00
..
benches Write char::DebugEscape sequences using write_str 2024-05-20 10:04:44 +02:00
src Rollup merge of #127748 - scottmcm:option_len, r=joboet 2024-07-18 18:10:16 +02:00
tests Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
Cargo.toml Cleanup bootstrap check-cfg 2024-06-27 11:30:03 +02:00