summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/variance
AgeCommit message (Collapse)AuthorLines
2024-12-22Begin to implement type system layer of unsafe bindersMichael Goulet-0/+5
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-10-10Add variances to RPITITsMichael Goulet-5/+44
2024-10-04rm `ItemKind::OpaqueTy`Noah Lev-7/+6
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-08-30Remove `#[macro_use] extern crate tracing` from `rustc_hir_analysis`.Nicholas Nethercote-0/+4
2024-08-27Add `warn(unreachable_pub)` to `rustc_hir_analysis`.Nicholas Nethercote-12/+12
2024-08-23Print the generic parameter along with the variance in dumps.Camille GILLOT-8/+24
2024-08-09Shrink `TyKind::FnPtr`.Nicholas Nethercote-2/+2
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+6
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-20Slightly refactor the dumping of HIR analysis dataLeón Orell Valerian Liehr-39/+33
2024-05-19Add and use generics.is_empty() and generics.is_own_empty, rather than using ↵Santiago Pastorino-2/+2
generics' attributes
2024-05-13Auto merge of #125076 - compiler-errors:alias-term, r=lcnrbors-1/+1
Split out `ty::AliasTerm` from `ty::AliasTy` Splitting out `AliasTerm` (for use in project and normalizes goals) and `AliasTy` (for use in `ty::Alias`) r? lcnr
2024-05-13split out AliasTy -> AliasTermMichael Goulet-1/+1
2024-05-13Remove `extern crate rustc_middle` from `rustc_hir_analysis`.Nicholas Nethercote-0/+2
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-2/+2
2024-04-14Don't leak unnameable types in -> _ recoverMichael Goulet-1/+1
2024-04-08Actually create ranged int types in the type system.Oli Scherer-0/+14
2024-03-22Make RawPtr take Ty and Mutbl separatelyMichael Goulet-2/+2
2024-03-22Update (doc) commentsLeón Orell Valerian Liehr-1/+1
Several (doc) comments were super outdated or didn't provide enough context. Some doc comments shoved everything in a single paragraph without respecting the fact that the first paragraph should be a single sentence because rustdoc treats these as item descriptions / synopses on module pages.
2024-03-11Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco"Oli Scherer-5/+8
This reverts commit 65cd843ae06ad00123c131a431ed5304e4cd577a, reversing changes made to d255c6a57c393db6221b1ff700daea478436f1cd.
2024-03-11Never bail out early while running all the type check queriesOli Scherer-8/+5
2024-03-08Make TAITs capture all higher-ranked lifetimes in scopeMichael Goulet-9/+1
2024-03-05Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`Jason Newcomb-8/+5
2024-02-12Dejargnonize substShoyu Vanilla-4/+4
2024-02-06Add CoroutineClosure to TyKind, AggregateKind, UpvarArgsMichael Goulet-2/+2
2024-01-17Stop using track_errors for some forever unstable rustc_attr analysesOli Scherer-5/+8
2024-01-14Use zip_eq to enforce that things being zipped have equal sizesMichael Goulet-1/+2
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-11-14finish `RegionKind` renamelcnr-3/+3
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
2023-11-13rename `ReLateBound` to `ReBound`lcnr-3/+5
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-10-20s/Generator/Coroutine/Oli Scherer-2/+2
2023-10-03Optimize some `alloc_from_iter` call sites.Nicholas Nethercote-1/+1
There's no need to collect an iterator into a `Vec`, or to call `into_iter` at the call sites.
2023-09-26Don't store lazyness in DefKindMichael Goulet-14/+8
2023-09-23Remove GeneratorWitness and rename GeneratorWitnessMIR.Camille GILLOT-5/+1
2023-08-30Revert "Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726"Oli Scherer-1/+9
This reverts commit cb9467515b5a9b15aaa905683c6b4dd9e851056c, reversing changes made to 57781b24c54f9548722927ba88c343ff28da94ce.
2023-08-28Test variances of opaque capturesMichael Goulet-0/+15
2023-08-07Store the laziness of type aliases in the DefKindLeón Orell Valerian Liehr-11/+8
2023-08-03Compute variances for lazy type aliasesLeón Orell Valerian Liehr-5/+41
2023-08-02Remove constness from `TraitPredicate`Deadbeef-1/+0
2023-07-25inline format!() args from rustc_codegen_llvm to the end (4)Matthias Krüger-2/+2
r? @WaffleLapkin
2023-07-17Rename arg_iter to iter_instantiatedMichael Goulet-1/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-34/+34
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-9/+1
2023-07-07Remove variances_of on RPITIT gats, remove its one use-caseMichael Goulet-9/+3
2023-06-29Properly implement variances_of for RPITIT GATSantiago Pastorino-9/+15
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-8/+5
2023-06-19s/Clause/ClauseKindMichael Goulet-3/+3
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-04-25Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, ↵Matthias Krüger-2/+1
r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish https://github.com/rust-lang/rust/issues/105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)