rust/compiler/rustc_middle/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
..
dep_graph inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
hir inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
infer refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
middle inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
mir Rollup merge of #114372 - RalfJung:const-pointer-as-int, r=oli-obk 2023-08-03 17:29:08 +02:00
query Convert adt_sized_constraint to early-binder, use list 2023-08-01 23:10:38 +00:00
thir refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
traits Rollup merge of #114169 - lcnr:unsize, r=compiler-errors 2023-07-31 16:57:53 +02:00
ty Remove constness from TraitPredicate 2023-08-02 15:38:00 +00:00
util inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
arena.rs Migrate predicates_of and caller_bounds to Clause 2023-06-26 23:12:03 +00:00
error.rs Don't attempt to compute layout of type referencing error 2023-07-27 18:24:08 +00:00
lib.rs s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList 2023-06-14 09:28:54 +02:00
lint.rs fix RedundantLocals clippy caused by async and await 2023-08-02 16:32:49 +08:00
macros.rs Make everything builtin! 2023-07-25 16:08:58 +00:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
values.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00