rust/src
Trevor Gross 0c2fbe53a6
Rollup merge of #140894 - Urgau:check-cfg-rustdoc, r=GuillaumeGomez
Make check-cfg diagnostics work in `#[doc(cfg(..))]`

This PR makes it so that the check-cfg `unexpected_cfgs` lint, is correctly emitted in `rustdoc`'s `#[doc(cfg(..))]`.

This is achieved by adding a custom trait to `cfg_matches` (the method that emits the lint) which permits `rustc` and `rustdoc` to each have their way to emitting lints (via buffered lints/AST for `rustc` and via `TyCtxt`/HIR for `rustdoc`).

The reason this is required is because buffered lints operates on the AST but `rustdoc` uses the HIR and by the time `rustdoc` calls `cfg_matches` we are way passed the point where buffered lints have been drain and emitted.

Best reviewed commit by commit.

r? `@jieyouxu` (for the compiler part)
r? `@GuillaumeGomez` (for the rustdoc part)
2025-05-27 20:28:30 -04:00
..
bootstrap Rollup merge of #141568 - onur-ozkan:141393-fix, r=Kobzol 2025-05-27 13:01:38 +02:00
build_helper Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
ci ci: use ghcr registry for x86_64-gnu-tools job 2025-05-27 11:23:05 +02:00
doc Rollup merge of #141596 - tshepang:patch-2, r=Urgau 2025-05-27 13:01:41 +02:00
etc Auto merge of #141062 - ChaiTRex:ide_fmt_2024, r=Mark-Simulacrum 2025-05-23 11:15:24 +00:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Rollup merge of #140894 - Urgau:check-cfg-rustdoc, r=GuillaumeGomez 2025-05-27 20:28:30 -04:00
llvm-project@c1118fdbb3 Update to LLVM 20.1.5 2025-05-16 08:34:16 +08:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc JSON: Don't apply #[repr] privacy heuristics 2025-05-22 21:26:48 +02:00
tools Rollup merge of #140367 - folkertdev:asm-cfg, r=nnethercote 2025-05-27 20:28:30 -04:00
README.md
stage0 update stage0 compiler 2025-05-12 15:33:35 +02:00
version bump version number to 1.89.0 2025-05-09 11:13:08 +02: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.