about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/variance
AgeCommit message (Collapse)AuthorLines
2025-09-17Remove `DynKind`León Orell Valerian Liehr-1/+1
2025-07-03compiler: inline 1-2 query provide fn in hir_analysis and hir_typeckJubilee Young-7/+2
Many small indirections with 1-2 items actively hinders understanding. Inlines various tiny submodule provides into - hir_analysis::provide - hir_analysis::check::provide - hir_typeck::provide
2025-05-27Fix some var namesMichael Goulet-4/+4
2025-05-27Rename unpack to kindMichael Goulet-3/+3
2025-04-29Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwUTrevor Gross-6/+20
implement or-patterns for pattern types These are necessary to represent `NonZeroI32`, as the range for that is `..0 | 1..`. The `rustc_scalar_layout_range_*` attributes avoided this by just implementing wraparound and having a single `1..=-1` range effectively. See https://rust-lang.zulipchat.com/#narrow/channel/481660-t-lang.2Fpattern-types/topic/.60or.20pattern.60.20representation.20in.20type.20system/with/504217694 for some background discussion cc https://github.com/rust-lang/rust/issues/123646 r? `@BoxyUwU`
2025-04-28Add or-patterns to pattern typesOli Scherer-0/+5
2025-04-28Split out various pattern type matches into their own functionOli Scherer-6/+15
2025-04-24Remove `weak` alias terminologyBoxy-2/+2
2025-04-09Auto merge of #139552 - matthiaskrgr:rollup-b194mk8, r=matthiaskrgrbors-3/+7
Rollup of 10 pull requests Successful merges: - #139494 (Restrict some queries by def-kind more) - #139496 (Revert r-a changes of rust-lang/rust#139455) - #139506 (add missing word in doc comment (part 2)) - #139515 (Improve presentation of closure signature mismatch from `Fn` trait goal) - #139520 (compiletest maintenance: sort deps and drop dep on `anyhow`) - #139523 (Rustc dev guide subtree update) - #139526 (Fix deprecation note for std::intrinsics) - #139528 (compiletest: Remove the `--logfile` flag) - #139541 (Instantiate higher-ranked transmute goal w/ placeholders before emitting sub-obligations) - #139547 (Update library tracking issue template to set S-tracking-unimplemented) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-08clean code: remove Deref<Target=RegionKind> impl for Region and use `.kind()`xizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-07Restrict some queries by def-kind moreMichael Goulet-3/+7
2025-03-06Remove the `Option` part of range ends in the HIROli Scherer-1/+1
2025-03-06Avoid having to handle an `Option` in the type systemOli Scherer-6/+2
2025-02-24hir_analysis: skip self type of host effect predsDavid Wood-0/+4
Like trait predicates, the self type ought to be skipped here.
2025-01-31Remove `xform` submodule.Nicholas Nethercote-26/+19
It used to be bigger, with an `Xform` trait, but now it has just a single function.
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