mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
2b094b1ede
Add 0..=isize::MAX range metadata to size loads from vtables This is the (much belated) size counterpart to #91569. Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often. Miri detects this UB already: |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |