rust/compiler/rustc_hir/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
..
arena.rs rustc_hir: Change representation of import paths to support multiple resolutions 2022-12-01 18:51:05 +03:00
def.rs diagnostics: if AssocFn has self argument, describe as method 2023-02-22 08:40:33 -07:00
def_path_hash_map.rs Use on-disk-hash-table format for DefPathHashMap in hir::definitions. 2021-09-14 13:54:41 +02:00
definitions.rs Properly skip RPITITs from ModChild and give a name in AssocItem 2023-03-29 11:19:49 -03:00
diagnostic_items.rs Introduce get_diagnostic_name 2021-10-06 08:40:28 -05:00
errors.rs have LangItemError derive everything LangItem does 2022-08-25 11:06:45 -06:00
hir.rs Remove box expressions from HIR 2023-03-14 17:18:26 +00:00
hir_id.rs Use local key in providers 2023-03-21 15:38:51 +00:00
intravisit.rs Remove box expressions from HIR 2023-03-14 17:18:26 +00:00
lang_items.rs Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk 2023-03-31 08:50:35 +00:00
lib.rs Separate lifetime ident from resolution in HIR. 2022-11-23 19:33:06 +00:00
pat_util.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
stable_hash_impls.rs Only compute the crate hash when necessary. 2023-03-08 09:30:22 +11:00
target.rs Add of_trait to DefKind::Impl. 2023-02-14 19:55:44 +00:00
tests.rs Use Symbol for the crate name instead of String/str 2022-12-07 20:30:02 +00:00
weak_lang_items.rs Rewrite implementation of #[alloc_error_handler] 2022-10-31 16:32:57 +00:00