rust/compiler/rustc_middle/src
bors 22a7a19f93 Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk
Insert alignment checks for pointer dereferences when debug assertions are enabled

Closes https://github.com/rust-lang/rust/issues/54915

- [x] Jake tells me this sounds like a place to use `MirPatch`, but I can't figure out how to insert a new basic block with a new terminator in the middle of an existing basic block, using `MirPatch`. (if nobody else backs up this point I'm checking this as "not actually a good idea" because the code looks pretty clean to me after rearranging it a bit)
- [x] Using `CastKind::PointerExposeAddress` is definitely wrong, we don't want to expose. Calling a function to get the pointer address seems quite excessive. ~I'll see if I can add a new `CastKind`.~ `CastKind::Transmute` to the rescue!
- [x] Implement a more helpful panic message like slice bounds checking.

r? `@oli-obk`
2023-03-31 08:50:35 +00:00
..
dep_graph Pass DepContext and QueryContext by value when practical 2023-02-14 17:21:18 +01:00
hir Update ty::VariantDef to use IndexVec<FieldIdx, FieldDef> 2023-03-30 09:23:40 -07:00
infer Auto merge of #108121 - aliemjay:resolve-var-region, r=lcnr 2023-03-08 12:33:21 +00:00
middle Rollup merge of #109704 - petrochenkov:effvisclean, r=jackh726 2023-03-30 12:42:19 -07:00
mir Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk 2023-03-31 08:50:35 +00:00
query Move mir::Fieldabi::FieldIdx 2023-03-28 22:22:37 -07:00
thir Move THIR printing to rustc_mir_build. 2023-02-26 14:31:15 +00:00
traits woops 2023-03-21 16:39:24 +01:00
ty Auto merge of #109762 - scottmcm:variantdef-indexvec, r=WaffleLapkin 2023-03-31 03:36:18 +00:00
util Add some docs to bug, span_bug and delay_span_bug 2022-12-30 16:47:56 +01:00
arena.rs rustc_interface: Add a new query pre_configure 2023-03-23 14:22:48 +04:00
error.rs Match crate and slug names 2022-11-21 15:24:50 +01:00
lib.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
lint.rs create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur 2023-01-10 10:56:17 +03:00
macros.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
metadata.rs rustc: Parameterize ty::Visibility over used ID 2022-09-07 13:35:41 +04:00
tests.rs
thir.rs Update ty::VariantDef to use IndexVec<FieldIdx, FieldDef> 2023-03-30 09:23:40 -07:00
values.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00