rust/compiler/rustc_const_eval/src
Dylan DPC 9e70b1a033
Rollup merge of #94827 - RalfJung:offset-from-ub, r=oli-obk
CTFE/Miri: detect out-of-bounds pointers in offset_from

Also I became uneasy with aggressively doing `try_to_int` here -- this will always succeed on Miri, leading to the wrong codepath being taken. We should rather try to convert them both to pointers, and use the integer path as a fallback, so that's what I implemented now.

Hiding whitespaces helps with the diff.

Fixes https://github.com/rust-lang/miri/issues/1950

r? ``@oli-obk``
2022-03-11 20:29:45 +01:00
..
const_eval Introduce ConstAllocation. 2022-03-07 08:25:50 +11:00
interpret Rollup merge of #94827 - RalfJung:offset-from-ub, r=oli-obk 2022-03-11 20:29:45 +01:00
transform Stabilize const_impl_trait as well 2022-03-07 08:47:18 -08:00
util rustc_const_eval: adopt let else in more places 2022-02-19 01:55:47 +01:00
lib.rs Switch bootstrap cfgs 2022-02-25 08:00:52 -05:00