summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/util
AgeCommit message (Collapse)AuthorLines
2022-10-05change might_permit_raw_init to fully detect LLVM UB, but not more than thatRalf Jung-0/+153
2022-08-03Auto merge of #100064 - RalfJung:disaligned, r=petrochenkovbors-16/+12
fix is_disaligned logic for nested packed structs https://github.com/rust-lang/rust/pull/83605 broke the `is_disaligned` logic by bailing out of the loop in `is_within_packed` early. This PR fixes that problem and adds suitable tests. Fixes https://github.com/rust-lang/rust/issues/99838
2022-08-03fix is_disaligned logic for nested packed structsRalf Jung-16/+12
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-3/+6
2022-07-01cleanup mir visitor for `rustc::pass_by_value`lcnr-2/+2
2022-05-02rustc: Panic by default in `DefIdTree::parent`Vadim Petrochenkov-3/+3
Only crate root def-ids don't have a parent, and in majority of cases the argument of `DefIdTree::parent` cannot be a crate root. So we now panic by default in `parent` and introduce a new non-panicing function `opt_parent` for cases where the argument can be a crate root. Same applies to `local_parent`/`opt_local_parent`.
2022-04-11Add new `Deinit` statement kindJakob Degen-26/+27
2022-03-30Spellchecking some commentsYuri Astrakhan-1/+1
This PR attempts to clean up some minor spelling mistakes in comments
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-2/+2
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-19rustc_const_eval: adopt let else in more placesest31-6/+3
2022-02-12Handle Fn family trait call errrorDeadbeef-2/+2
2022-02-12Rebased and improved errorsDeadbeef-3/+1
2022-02-12Improve error messages even moreDeadbeef-0/+147
2021-12-22Store a `DefId` instead of an `AdtDef` in `AggregateKind::Adt`Aaron Hill-1/+2
The `AggregateKind` enum ends up in the final mir `Body`. Currently, any changes to `AdtDef` (regardless of how significant they are) will legitimately cause the overall result of `optimized_mir` to change, invalidating any codegen re-use involving that mir. This will get worse once we start hashing the `Span` inside `FieldDef` (which is itself contained in `AdtDef`). To try to reduce these kinds of invalidations, this commit changes `AggregateKind::Adt` to store just the `DefId`, instead of the full `AdtDef`. This allows the result of `optimized_mir` to be unchanged if the `AdtDef` changes in a way that doesn't actually affect any of the MIR we build.
2021-09-07Rename rustc_mir to rustc_const_eval.Camille GILLOT-0/+225