diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-18 18:10:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 18:10:16 +0200 |
| commit | 6f7fa03a0608c2eaaff2ad9c0afbb3414cd4b978 (patch) | |
| tree | 8e99c190675ef773768073568746ab26a2536ab7 /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | ec6110f00c1eb6fe5f4ba68210989d4eed75cd74 (diff) | |
| parent | eb3cc5f824d74eb50ad1bdb3105045bd8eb135ef (diff) | |
| download | rust-6f7fa03a0608c2eaaff2ad9c0afbb3414cd4b978.tar.gz rust-6f7fa03a0608c2eaaff2ad9c0afbb3414cd4b978.zip | |
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.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
