rust/src
Jakub Beránek 64a7fcf26e
Rollup merge of #142758 - jieyouxu:rustdoc-json-types, r=Kobzol
Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed

I think `rustdoc-json-types` was more recently split out, so this download-rustc logic became outdated as it wasn't tracked. This PR adds `src/rustdoc-json-types` to be tracked for difference versus upstream, so that we properly rebuild rustdoc if it has changes versus upstream.

Fixes rust-lang/rust#142738.

### Local testing

This is not so easy to test locally because it requires download-rustc. To test this, you need to:

1. Disable `download-rustc` inhibition from bootstrap changes versus upstream, by including `:!src/bootstrap` in 255aa22082/src/bootstrap/src/core/config/config.rs (L67-L74).
2. Then, use a config like `profile = "tools"` which by default uses `download-rustc = "if-unchanged"`.
3. Run `./x test tests/rustdoc-json` one time, to "prime" initial build caches.
4. Change the `FORMAT_VERSION` in `src/rustdoc-json-types`, i.e.
	```diff
	diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs
	index 1f93895ae07..72a3720c7b4 100644
	--- a/src/rustdoc-json-types/lib.rs
	+++ b/src/rustdoc-json-types/lib.rs
	``@@`` -38,7 +38,7 ``@@``
	 // are deliberately not in a doc comment, because they need not be in public docs.)
	 //
	 // Latest feature: Pretty printing of inline attributes changed
	-pub const FORMAT_VERSION: u32 = 48;
	+pub const FORMAT_VERSION: u32 = 666;
	```
5. Observe that without this patch, `rustdoc-json` tests fail because `FORMAT_VERSION` mismatch. Observe that with this patch, rustdoc gets properly rebuilt and `rustdoc-json` tests pass.

cc ``@aDotInTheVoid``

r? Kobzol
2025-06-20 20:03:23 +02:00
..
bootstrap Rollup merge of #142758 - jieyouxu:rustdoc-json-types, r=Kobzol 2025-06-20 20:03:23 +02:00
build_helper Move submodule path cache from parse_gitmodules to Builder 2025-06-12 15:48:50 +02:00
ci Auto merge of #142245 - marcoieni:split-gnu-tools, r=Kobzol 2025-06-19 10:39:00 +00:00
doc Rollup merge of #142743 - tshepang:rdg-push, r=jieyouxu 2025-06-20 20:03:22 +02:00
etc Remove unused bootstrap flag 2025-06-18 09:38:28 +02:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Rollup merge of #142720 - yotamofek:pr/rustdoc/ext-crate-cleanup, r=GuillaumeGomez 2025-06-20 20:03:21 +02:00
llvm-project@ed6566573e Update to LLVM 20.1.7 2025-06-13 14:44:34 +08:00
rustc-std-workspace
rustdoc-json-types bump rustdoc json format number for pretty print change of attribute 2025-06-18 14:04:54 +02:00
tools Auto merge of #142286 - Kobzol:clippy-jemalloc, r=flip1995,blyxyas 2025-06-20 06:33:35 +00:00
README.md
stage0 Bump master stage0 compiler 2025-05-27 20:36:00 +08: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.