rust/compiler/rustc_middle/src/mir
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
..
interpret address review comments 2023-03-28 13:22:01 +00:00
basic_blocks.rs Rollup merge of #107151 - tmiasko:dominators-no-inline, r=compiler-errors 2023-01-23 19:30:01 +09:00
coverage.rs Replace enum ==s with matches where it makes sense 2023-01-30 12:26:26 +00:00
generic_graph.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
generic_graphviz.rs Remove redundant graphviz escaping 2022-11-14 15:11:18 +01:00
graphviz.rs Use Mutability::{is_mut, is_not} 2023-01-30 12:26:26 +00:00
mod.rs Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk 2023-03-31 08:50:35 +00:00
mono.rs Support TLS access into dylibs on Windows 2023-03-29 08:55:21 +02:00
patch.rs Wrap the whole LocalInfo in ClearCrossCrate. 2023-03-14 20:52:42 +01:00
pretty.rs Address the new odd backticks tidy lint in compiler/ 2023-03-11 20:40:18 +01:00
query.rs Move mir::Fieldabi::FieldIdx 2023-03-28 22:22:37 -07:00
spanview.rs Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
syntax.rs Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk 2023-03-31 08:50:35 +00:00
tcx.rs Update ty::VariantDef to use IndexVec<FieldIdx, FieldDef> 2023-03-30 09:23:40 -07:00
terminator.rs Remove DropAndReplace terminator 2023-03-07 14:25:22 +01:00
traversal.rs Refactor basic blocks control flow caches 2023-01-17 12:36:58 +01:00
type_foldable.rs Rename many interner functions. 2023-02-24 07:32:24 +11:00
visit.rs Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk 2023-03-31 08:50:35 +00:00