about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/adt.rs
AgeCommit message (Collapse)AuthorLines
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-2/+2
2025-07-28use let chains in hir, lint, mirKivooeo-4/+4
2025-07-09Port `#[fundamental]` to the new attribute systemPavel Grigorenko-2/+1
2025-07-04Port `#[non_exhaustive]` to the new attribute parsing infrastructureJonathan Brouwer-1/+4
2025-06-16trait_sel: `{Meta,Pointee}Sized` on `?Sized` typesDavid Wood-6/+15
Expand the automatic implementation of `MetaSized` and `PointeeSized` so that it is also implemented on non-`Sized` types, just not `ty::Foreign` (extern type).
2025-04-18Re-remove `AdtFlags::IS_ANONYMOUS`Sky-2/+0
2025-04-13Initial `UnsafePinned`/`UnsafeUnpin` impl [Part 1: Libs]Sky-0/+13
2025-04-02Fetch the destructor constness lazilyOli Scherer-1/+1
2025-03-19Rollup merge of #138001 - meithecatte:privately-uninhabited, r=NadrierilMatthias Krüger-0/+11
mir_build: consider privacy when checking for irrefutable patterns This PR fixes #137999. Note that, since this makes the compiler reject code that was previously accepted, it will probably need a crater run. I include a commit that factors out a common code pattern into a helper function, purely because the fact that this was repeated all over the place was bothering me. Let me know if I should split that into a separate PR instead.
2025-03-10Remove AdtFlags::IS_ANONYMOUS and Copy/Clone condition for anonymous ADTMichael Goulet-8/+0
2025-03-07Add helper methods checking for "#[non_exhaustive] that's active"Maja Kądziołka-0/+11
A check for `#[non_exhaustive]` is often done in combination with checking whether the type is local to the crate, in a variety of ways. Create a helper method and standardize on it as the way to check for this.
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-2/+1
2025-02-13Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validityMichael Goulet-0/+4
2024-12-31Convert some Into impls into From implsMichael Goulet-3/+3
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-1/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-11-22Implement ~const Destruct in new solverMichael Goulet-4/+8
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-2/+3
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-11-03compiler: Directly use rustc_abi in metadata and middleJubilee Young-1/+1
Stop reexporting ReprOptions from middle::ty
2024-10-01Remove unnamed field featureMichael Goulet-8/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-10/+9
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-07Uplift trait_ref_is_knowable and friendsMichael Goulet-0/+4
2024-06-18Uplift the new trait solverMichael Goulet-1/+9
2024-06-14Use is_lang_item more aggressivelyMichael Goulet-5/+5
2024-06-13Rework most of structural_traits to be Interner-agnosticMichael Goulet-0/+17
2024-06-06Uplift TypeRelation and RelateMichael Goulet-0/+6
2024-05-29Optimize async drop glue for some old typesDaria Sukhonina-2/+2
2024-05-29Start implementing needs_async_drop and relatedDaria Sukhonina-1/+9
2024-05-26Give EarlyBinder a tcx parameterMichael Goulet-1/+1
We are gonna need it to uplift EarlyBinder
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-04-29Remove `extern crate bitflags` from a couple of crates.Nicholas Nethercote-1/+1
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-2/+2
2024-03-27Remove `Partial/Ord` from `AdtDef`Oli Scherer-16/+1
2024-03-14clean up ADT sized constraint computationLukas Markeffsky-4/+4
2024-03-14make `Representability::Infinite` carry `ErrorGuaranteed`Lukas Markeffsky-1/+1
2024-02-27Avoid `span_delayed_bug` on one path in `AdtDef::eval_explicit_discr`.Nicholas Nethercote-13/+24
Also change its return type to `Result`.
2024-02-12check uniqueness of nested fieldsFrank King-1/+1
2024-02-12Lower anonymous structs or unions to HIRFrank King-1/+16
2023-12-30Update to bitflags 2 in the compilerNilstrieb-2/+4
This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually. Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did.
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-2/+2
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-1/+1
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-2/+2
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-09-26Don't store lazyness in DefKindMichael Goulet-1/+1
2023-09-14move required_consts check to general post-mono-check functionRalf Jung-2/+2
2023-08-07Store the laziness of type aliases in the DefKindLeón Orell Valerian Liehr-1/+1
2023-08-01Fix a commentMichael Goulet-10/+2
2023-08-01Convert adt_sized_constraint to early-binder, use listMichael Goulet-2/+2
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-1/+1
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-1/+1
2023-05-19Add extra debug assertions for equality for Adt/Variant/FieldDefMichael Goulet-3/+21