rust/src
Jonathan Brouwer 725eb60ded
Rollup merge of #152261 - fmease:has-own-self, r=BoxyUwU
Introduce helper `ty::Generics::has_own_self`

The pattern `generics.has_self && generics.parent.is_none()` only occurs 5 times in rustc+rustdoc at the time of writing but I keep getting reminded/annoyed that there doesn't exist a nice wrapper fn that abstracts it & immediately clarifies the intent. Most recently that happened when working on my open PR RUST-129543 in which I add yet another occurrence of it ([via](ae8c0a5a46/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs (L1771-L1773))).

For context, `generics.has_self` indicates that there is a `Self` type parameter (at position 0) in the "oldest" / "root" generic parameter list in the chain of generic parameter lists (rephrased: it's true if the chain *as a whole* has a `Self` type parameter). `has_own_self` on the other hand indicates that the `own_params` contain a `Self` type parameter which is sometimes needed for offsetting the own parameters or arguments.
2026-02-07 19:34:50 +01:00
..
bootstrap Rollup merge of #152217 - JonathanBrouwer:convert_line, r=jdonszelmann 2026-02-07 19:34:49 +01:00
build_helper citool: report debuginfo test statistics 2026-02-04 06:44:09 +05:30
ci Auto merge of #152230 - JonathanBrouwer:rollup-de59XEq, r=JonathanBrouwer 2026-02-06 15:32:38 +00:00
doc Rollup merge of #151933 - foxtran:doc/linker-plugin-lto-full-lto, r=nnethercote 2026-02-07 13:06:36 +01:00
etc fixup debugger files wrt to MaybeDangling 2025-12-26 22:02:17 +01:00
gcc@0081ca6631 Update GCC submodule 2025-11-26 20:11:43 +01:00
librustdoc Rollup merge of #152261 - fmease:has-own-self, r=BoxyUwU 2026-02-07 19:34:50 +01:00
llvm-project@41256ab128 Update to LLVM 22 2026-01-27 12:09:39 +01:00
rustc-std-workspace Generalize branch references to HEAD 2025-11-02 11:15:55 +01:00
rustdoc-json-types rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution 2025-11-21 09:22:59 +00:00
tools Port rustc_intrinsic to the new attribute parser 2026-02-07 14:12:56 +01:00
README.md
stage0 Bump stage0 2026-01-21 20:03:56 -05:00
version Bump version to 1.95.0 2026-01-17 10:19:26 -05:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.