about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-18 18:10:16 +0200
committerGitHub <noreply@github.com>2024-07-18 18:10:16 +0200
commit6f7fa03a0608c2eaaff2ad9c0afbb3414cd4b978 (patch)
tree8e99c190675ef773768073568746ab26a2536ab7 /compiler/rustc_hir_analysis/src/errors.rs
parentec6110f00c1eb6fe5f4ba68210989d4eed75cd74 (diff)
parenteb3cc5f824d74eb50ad1bdb3105045bd8eb135ef (diff)
downloadrust-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