summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-18 22:01:39 +0000
committerbors <bors@rust-lang.org>2022-12-18 22:01:39 +0000
commit2b094b1ede1cb04095a3210eb2f40f398d4a832a (patch)
treeec3775f15dcec456448837bfa51911bc1af0c194 /tests/rustdoc-js-std/parser-errors.js
parentd0dc9efff14ac0a1eeceffd1e605e37eeb8362a0 (diff)
parente01d944c6c33a76cdbd1a257743d8c41a8203e89 (diff)
downloadrust-2b094b1ede1cb04095a3210eb2f40f398d4a832a.tar.gz
Auto merge of #105446 - erikdesjardins:vt-size, r=nikic
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: https://github.com/rust-lang/rust/blob/b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573/compiler/rustc_const_eval/src/interpret/traits.rs#L119-L121 (In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](https://github.com/rust-lang/rust/blob/9db224fc908059986c179fc6ec433944e9cfce50/compiler/rustc_abi/src/lib.rs#L312-L331), but I don't think we can assume that in an optimization.)
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions