about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/unsize.rs
AgeCommit message (Collapse)AuthorLines
2025-09-28remove explicit deref of AbiAlign for most methodsJubilee Young-3/+3
Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed. For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-17Remove `DynKind`León Orell Valerian Liehr-3/+1
2025-07-01Remove support for dyn*Michael Goulet-33/+0
2025-06-12intrinsics: rename min_align_of to align_ofRalf Jung-1/+1
2025-06-05Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of NoneOli Scherer-1/+1
2025-01-30Use ExistentialTraitRef throughout codegenMichael Goulet-1/+6
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-1/+2
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-10-17Allow dropping dyn principalMichael Goulet-1/+3
2024-09-30Relax a debug assertion in codegenMichael Goulet-14/+3
2024-09-25Add a debug assertion in codegen that unsize casts of the same principal ↵Michael Goulet-1/+16
trait def id are truly NOPs
2024-09-20Do not unnecessarily eval consts in codegenMichael Goulet-4/+4
2024-08-08Rename struct_tail_erasing_lifetimes to struct_tail_for_codegenMichael Goulet-1/+1
2024-06-14Only compute vtable information during codegenMichael Goulet-2/+1
2024-05-09Make builtin_deref just return a TyMichael Goulet-1/+1
2024-03-22Programmatically convert some of the pat ctorsMichael Goulet-4/+2
2024-03-05only set noalias on Box with the global allocatorRalf Jung-4/+0
2024-01-26Merge commit '3e50cf65025f96854d6597e80449b0d64ad89589' into ↵bjorn3-4/+3
sync_cg_clif-2024-01-26
2023-12-19Merge commit '3a9bf729322fb5035518f99b9d76a742bf7c124e' into ↵bjorn3-30/+84
sync_cg_clif-2023-12-19
2023-08-29const_eval and codegen: audit uses of is_zstRalf Jung-1/+3
2023-07-07Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`Nilstrieb-2/+2
It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
2023-03-28Move `mir::Field` → `abi::FieldIdx`Scott McMurray-2/+2
The first PR for https://github.com/rust-lang/compiler-team/issues/606 This is just the move-and-rename, because it's plenty big-and-bitrotty already. Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
2023-03-25Refactor: `VariantIdx::from_u32(0)` -> `FIRST_VARIANT`Scott McMurray-1/+1
Since structs are always `VariantIdx(0)`, there's a bunch of files where the only reason they had `VariantIdx` or `vec::Idx` imported at all was to get the first variant. So this uses a constant for that, and adds some doc-comments to `VariantIdx` while I'm there, since it doesn't have any today.
2023-03-15Merge commit 'dec0daa8f6d0a0e1c702f169abb6bf3eee198c67' into ↵bjorn3-4/+2
sync_cg_clif-2023-03-15
2023-02-14s/eval_usize/eval_target_usize/ for clarityOli Scherer-1/+1
2022-10-23Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into ↵bjorn3-1/+39
sync_cg_clif-2022-10-23
2022-08-06make NOP dyn casts not require anything about the vtableRalf Jung-0/+1
2022-07-25Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into ↵bjorn3-5/+1
sync_cg_clif-2022-07-25
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-15Overhaul `TyS` and `Ty`.Nicholas Nethercote-1/+1
Specifically, change `Ty` from this: ``` pub type Ty<'tcx> = &'tcx TyS<'tcx>; ``` to this ``` pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>); ``` There are two benefits to this. - It's now a first class type, so we can define methods on it. This means we can move a lot of methods away from `TyS`, leaving `TyS` as a barely-used type, which is appropriate given that it's not meant to be used directly. - The uniqueness requirement is now explicit, via the `Interned` type. E.g. the pointer-based `Eq` and `Hash` comes from `Interned`, rather than via `TyS`, which wasn't obvious at all. Much of this commit is boring churn. The interesting changes are in these files: - compiler/rustc_middle/src/arena.rs - compiler/rustc_middle/src/mir/visit.rs - compiler/rustc_middle/src/ty/context.rs - compiler/rustc_middle/src/ty/mod.rs Specifically: - Most mentions of `TyS` are removed. It's very much a dumb struct now; `Ty` has all the smarts. - `TyS` now has `crate` visibility instead of `pub`. - `TyS::make_for_test` is removed in favour of the static `BOOL_TY`, which just works better with the new structure. - The `Eq`/`Ord`/`Hash` impls are removed from `TyS`. `Interned`s impls of `Eq`/`Hash` now suffice. `Ord` is now partly on `Interned` (pointer-based, for the `Equal` case) and partly on `TyS` (contents-based, for the other cases). - There are many tedious sigil adjustments, i.e. adding or removing `*` or `&`. They seem to be unavoidable.
2021-08-18Fold `vtable_trait_upcasting_coercion_new_vptr_slot` logic into obligation ↵Charles Lew-14/+3
processing.
2021-08-06Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into ↵bjorn3-2/+0
sync_cg_clif-2021-08-06
2021-08-03Implement pointer casting.Charles Lew-15/+48
2021-06-28Update other codegens to use tcx managed vtable allocations.Charles Lew-3/+1
2021-03-05Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into ↵bjorn3-50/+25
sync_cg_clif-2021-03-05
2020-10-26Add 'compiler/rustc_codegen_cranelift/' from commit ↵bjorn3-0/+238
'793d26047f994e23415f8f6bb5686ff25d3dda92' git-subtree-dir: compiler/rustc_codegen_cranelift git-subtree-mainline: cf798c1ec65a5ec3491846777f9003fabb881b4a git-subtree-split: 793d26047f994e23415f8f6bb5686ff25d3dda92