about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2025-09-08Skip typeck for items w/o their own typeck contextDaria Sukhonina-1/+2
More details on about this fix: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/ICE.3A.20typecks.20AnonConst.20under.20parallel.20rustc.28.23141951.29/with/538200980 Co-authored-by: ywxt <ywxtcwh@gmail.com>
2025-09-02stabilize extended_varargs_abi_supportRalf Jung-36/+23
2025-08-25support non-defining uses in HIR typecklcnr-1/+1
2025-07-03compiler: document all provide fn in hir_analysis and hir_typeckJubilee Young-0/+1
2025-07-03compiler: inline 1-2 query provide fn in hir_analysis and hir_typeckJubilee Young-4/+6
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-06-28Remove unused feature gatesYotam Ofek-1/+0
2025-06-20Use gen blocks in the compiler instead of from_coroutineMichael Goulet-1/+1
2025-06-15Auto merge of #142455 - ↵bors-5/+33
jdonszelmann:attempt-to-mitigate-delayed-lint-perf-problems, r=oli-obk collect delayed lints in hir_crate_items r? `@oli-obk` Attempt to mitigate perf problems in rust-lang/rust#138164
2025-06-13variadic functions: remove list of supported ABIs from errorRalf Jung-13/+5
2025-06-13collect delayed lints in hir_crate_itemsJana Dönszelmann-5/+33
2025-06-12introduce new lint infraJana Dönszelmann-1/+18
lint on duplicates during attribute parsing To do this we stuff them in the diagnostic context to be emitted after hir is constructed
2025-06-07Auto merge of #141950 - oli-obk:big-body-owner-loop, r=compiler-errorsbors-2/+7
Move coroutine_by_move_body_def_id into the big check_crate body owner loop This avoids starting a parallel loop in sequence and instead runs all the queries for a specific DefId together.
2025-06-03Run wfcheck in one big loop instead of per moduleOli Scherer-3/+1
2025-06-03Move coroutine_by_move_body_def_id into the big check_crate body owner loopOli Scherer-2/+7
2025-05-27Always evaluate free lifetime-generic constantsLeón Orell Valerian Liehr-1/+3
Co-authored-by: Michael Goulet <michael@errs.io>
2025-05-17Auto merge of #140856 - oli-obk:merge-queries2, r=nnethercotebors-11/+11
Merge mir query analysis invocations r? `@ghost` same thing as https://github.com/rust-lang/rust/pull/140854 just a different set of queries Doing this in general has some bad cache coherence issues because the query caches are laid out in Vec<QueryResult> lists per query where each index refers to a DefId in the same order as we're iterating. Iterating two or more lists at the same time does have cache issues, so I want to poke a bit at it to see if we can't merge just a few of them at a time.
2025-05-13Run rustc_attrs dumps after typeckOli Scherer-11/+11
2025-05-12update cfg(bootstrap)Pietro Albini-1/+0
2025-05-09Merge typeck loop with static/const item eval loopOli Scherer-4/+0
2025-05-05Rename Instance::new to Instance::new_raw and add a note that it is rawMichael Goulet-1/+1
2025-04-23Make #![feature(let_chains)] bootstrap conditional in compiler/est31-1/+1
2025-04-02Remove `recursion_limit` increases.Nicholas Nethercote-1/+0
These are no longer needed now that `Nonterminal` is gone.
2025-03-15Add RTN support to rustdocMichael Goulet-1/+3
2025-03-12Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgrbors-1/+0
Rollup of 7 pull requests Successful merges: - #137314 (change definitely unproductive cycles to error) - #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138345 (Some autodiff cleanups) - #138387 (intrinsics: remove unnecessary leading underscore from argument names) - #138390 (fix incorrect tracing log) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-11Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-0/+1
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
2025-03-07Increase recursion_limit in numerous crates.Nicholas Nethercote-0/+1
This is temporarily needed for `x doc compiler` to work. They can be removed once the `Nonterminal` is removed (#124141).
2025-03-03Don't typeck during WF, instead check outside of WF in check_crateMichael Goulet-5/+5
2025-02-28Introduce `feature(generic_const_parameter_types)`Boxy-1/+1
2025-02-21Move methods from Map to TyCtxt, part 3.Nicholas Nethercote-2/+2
Continuing the work from #137162. Every method gains a `hir_` prefix.
2025-02-18Rollup merge of #137206 - estebank:e0599-structured, r=jieyouxuMatthias Krüger-0/+1
Make E0599 a structured error
2025-02-18Make E0599 a structured errorEsteban Küber-0/+1
2025-02-18Move methods from `Map` to `TyCtxt`, part 2.Nicholas Nethercote-3/+3
Continuing the work started in #136466. Every method gains a `hir_` prefix, though for the ones that already have a `par_` or `try_par_` prefix I added the `hir_` after that.
2025-02-15HIR analysis: Remove unnecessary abstraction over list of clausesLeón Orell Valerian Liehr-1/+0
2025-02-12Split out the `extern_system_varargs` featureJubilee Young-14/+28
After the stabilization PR was opened, `extern "system"` functions were added to `extended_varargs_abi_support`. This has a number of questions regarding it that were not discussed and were somewhat surprising. It deserves to be considered as its own feature, separate from `extended_varargs_abi_support`.
2025-02-11Revert "Stabilize `extended_varargs_abi_support`"Jubilee Young-2/+29
This reverts commit 685f189b4307435b83d625fea397ef36dff4e955.
2025-02-01Use an explicit type when discarding the result of `tcx.ensure_ok()`Zalathar-5/+9
2025-02-01Rename `tcx.ensure()` to `tcx.ensure_ok()`Zalathar-8/+8
2025-01-31Auto merge of #136332 - jhpratt:rollup-aa69d0e, r=jhprattbors-5/+5
Rollup of 9 pull requests Successful merges: - #132156 (When encountering unexpected closure return type, point at return type/expression) - #133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle) - #136281 (`rustc_hir_analysis` cleanups) - #136297 (Fix a typo in profile-guided-optimization.md) - #136300 (atomic: extend compare_and_swap migration docs) - #136310 (normalize `*.long-type.txt` paths for compare-mode tests) - #136312 (Disable `overflow_delimited_expr` in edition 2024) - #136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics) - #136323 (Fix a typo in conventions.md) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-31Don't export `rustc_hir_analysis::collect`.Nicholas Nethercote-5/+5
Instead re-export `rustc_hir_analysis::collect::suggest_impl_trait`, which is the only thing from the module used in another crate. This fixes a `FIXME` comment. Also adjust some visibilities to satisfy the `unreachable_pub` lint. This changes requires downgrading a link in a comment on `FnCtxt` because `collect` is no longer public and rustdoc complains otherwise. This is annoying but I can't see how to avoid it.
2025-01-30Rework rustc_dump_vtableMichael Goulet-5/+8
2025-01-24use `fmt::from_fn` in more places, instead of using structs that impl ↵Yotam Ofek-0/+1
formatting traits
2025-01-03Do not project when there are unconstrained impl paramsMichael Goulet-0/+2
2024-12-01Rollup merge of #132047 - compiler-errors:rbv-rtn-cleanup, r=cjgillotMatthias Krüger-0/+2
Robustify and genericize return-type-notation resolution in `resolve_bound_vars` #129629 implemented return-type-notation (RTN) in its path form, like `where T::method(..): Bound`. As part of lowering, we must record the late-bound vars for the where clause introduced by the method (namely, its early- and late-bound lifetime arguments, since `where T::method(..)` turns into a higher-ranked where clause over all of the lifetimes according to [RFC 3654](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#converting-to-higher-ranked-trait-bounds)). However, this logic was only looking at the where clauses of the parent item that the `T::method(..)` bound was written on, and not any parent items. This PR generalizes that logic to look at the parent item (i.e. the outer impl or trait) instead and fixes a (debug only) assertion as an effect. This logic is also more general and likely easier to adapt to more interesting (though likely very far off) cases like non-lifetime binder `for<T: Trait> T::method(..): Send` bounds. Tracking: - https://github.com/rust-lang/rust/issues/109417
2024-11-27Stabilize `extended_varargs_abi_support`Soveu-29/+2
2024-11-27Robustify and genericize RTN resolution in RBVMichael Goulet-0/+2
2024-11-20Auto merge of #133212 - lcnr:questionable-uwu, r=compiler-errorsbors-2/+2
continue `ParamEnv` to `TypingEnv` transition cc #132279 r? `@compiler-errors`
2024-11-19`InterpCx` store `TypingEnv` instead of a `ParamEnv`lcnr-2/+2
2024-11-19Introduce `min_generic_const_args` and directly represent pathsNoah Lev-1/+14
Co-authored-by: Boxy UwU <rust@boxyuwu.dev> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>