rust/compiler/rustc_const_eval/src
Matthias Krüger 00dcc7b97c
Rollup merge of #114372 - RalfJung:const-pointer-as-int, r=oli-obk
const validation: point at where we found a pointer but expected an integer

Instead of validation just printing "unable to turn pointer into bytes", make this a regular validation error that says where in the value the bad pointer was found. Also distinguish "expected integer, got pointer" from "expected pointer, got partial pointer or mix of pointers".

To avoid duplicating things too much I refactored the diagnostics for validity a bit, so that "got uninit, expected X" and "got pointer, expected X" can share the "X" part. Also all the errors emitted for validation are now grouped under `const_eval_validation` so that they are in a single group in the ftl file.

r? `@oli-obk`
2023-08-03 17:29:08 +02:00
..
const_eval rename deref_operand → deref_pointer and some Miri helper functions 2023-08-01 13:40:29 +02:00
interpret Rollup merge of #114372 - RalfJung:const-pointer-as-int, r=oli-obk 2023-08-03 17:29:08 +02:00
transform Remove constness from TraitPredicate 2023-08-02 15:38:00 +00:00
util Turns out opaque types can have hidden types registered during mir validation 2023-07-27 08:23:06 +00:00
errors.rs const validation: point at where we found a pointer but expected an integer 2023-08-02 18:51:50 +02:00
lib.rs Name the destructure_mir_constant query appropriately 2023-07-05 15:54:43 +00:00