Commit graph

158137 commits

Author SHA1 Message Date
Chris Krycho
7bae381274
TRPL: incorporate all backward-compatible Edition changes
This incorporates all the backwards-compatible changes for the 2024
Edition. There will also be a follow-on PR to land revisions to the new
chapter on async so it can be as ready as possible when officially
released with 1.85 and the 2024 Edition.

Additionally, there are a few other, non-backward-compatible, changes
(largely around `use<..>`) we can only land using the stable edition,
which we may or may not be able to land in 1.85 by using the beta
toolchain in the example code. Those may or may not be ported over,
depending on how that does or does not play with the infrastructure.
2025-01-14 15:52:41 -07:00
bors
c074d8eee7 Auto merge of #135442 - antoyo:subtree-update_cg_gcc_2025_01_12, r=GuillaumeGomez
Subtree update cg_gcc 2025/01/12

r? GuillaumeGomez
2025-01-14 11:28:34 +00:00
bors
e491caec14 Auto merge of #135359 - RalfJung:lang-start-unwind, r=joboet
use a single large catch_unwind in lang_start

I originally planned to use `abort_unwind` but reading the comment in `thread_cleanup` it seems we are deliberately going for slightly nicer error messages here, so this preserves that. It still seems nice to not repeat `catch_unwind` so often.
2025-01-14 05:58:48 +00:00
Jacob Pratt
ab77d157e2
Rollup merge of #135452 - jieyouxu:fix-comment, r=compiler-errors
bootstrap: fix outdated feature name in comment

Follow-up to https://github.com/rust-lang/rust/pull/135391#discussion_r1912826594.

I guess I updated everything else **except** the comment right next to the actual dependencies 💀

r? bootstrap
2025-01-13 20:43:50 -05:00
许杰友 Jieyou Xu (Joe)
a9f32406da bootstrap: fix outdated feature name in comment 2025-01-14 03:34:51 +08:00
Antoni Boucher
f3cfff7e98 Fix error in CI by updating the GCC version 2025-01-13 14:22:15 -05:00
Eric Huss
75f3ebdc1e Mark rustbook as an external tool
It has been a bit of a pain trying to keep the lints in sync across
the submodule repositories, so the just turns it off.
2025-01-13 10:10:40 -08:00
rustbot
b3ba4de8b2 Update books 2025-01-13 12:00:40 -05:00
bors
b4045a404e Auto merge of #135430 - jhpratt:rollup-39cecwd, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 - #135355 (ci: added test log format for ci)
 - #135386 (clean up code related to the rustdoc-js test suite)
 - #135391 (bootstrap: Implement conditional `tracing` infra)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-13 07:34:54 +00:00
Jacob Pratt
cc00936dda
Rollup merge of #135391 - jieyouxu:conditional-tracing, r=onur-ozkan
bootstrap: Implement conditional `tracing` infra

Add a conditional `tracing` setup that is gated behind `BOOTSTRAP_TRACING` env var. This `tracing` infra is implemented by:

- Introducing an optional `tracing` cargo feature in bootstrap.
- Added optional `tracing*` dependencies which are gated behind the `tracing` cargo feature.
- When `BOOTSTRAP_TRACING` is set, `bootstrap.py` will build bootstrap with `--features=tracing`.

There is a small trick here to share `BOOTSTRAP_TRACING` env var without having to add a separate env var:

- `BOOTSTRAP_TRACING=1` is not a registered `tracing` filter target, so that can be used to enable the `tracing` cargo feature yet not actually enable any tracing logs (useful for editor r-a setups without actually outputting any tracing logs).
- `BOOTSTRAP_TRACING=TRACE` and such are actually valid `tracing` filters, but that sets `BOOTSTRAP_TRACING` anyway.

Example usage: https://github.com/rust-lang/rust/pull/135299 (that experimental PR is not conditionally gated)
This PR is intentionally kept minimal to focus on the infra itself. To get actual mileage, instrumentations will need to be added to individual `Step`s and such.

r? `@onur-ozkan` (or reroll)
2025-01-13 01:05:11 -05:00
Jacob Pratt
abdd40d84d
Rollup merge of #135386 - lolbinarycat:bootstrap-test-cleanup, r=jieyouxu
clean up code related to the rustdoc-js test suite

r? `@jieyouxu`
2025-01-13 01:05:11 -05:00
Jacob Pratt
cc19b9b83b
Rollup merge of #135355 - ranger-ross:improved-ci-logs, r=onur-ozkan
ci: added test log format for ci

This PR adds a new test render format specifically for ci.
The goal as stated in #134910 is to make reviewing test failures in CI easier.

See the new test output format in the CI for this PR ([here](https://github.com/rust-lang/rust/actions/runs/12723914643/job/35469515397?pr=135355))

closes #134910 cc: `@jyn514`
2025-01-13 01:05:10 -05:00
许杰友 Jieyou Xu (Joe)
3ae724e6a0 rustc-dev-guide: document BOOTSTRAP_TRACING and bootstrap tracing setup 2025-01-13 13:46:20 +08:00
bors
a2016aaba6 Auto merge of #135352 - notriddle:notriddle/stability-shown, r=camelid
rustdoc: use import stability marker in display

Fixes #135078
2025-01-13 04:49:27 +00:00
许杰友 Jieyou Xu (Joe)
a4b9aa3e6e bootstrap.py: build bootstrap binary with --features=tracing if BOOTSTRAP_TRACING env var is set 2025-01-13 08:16:18 +08:00
许杰友 Jieyou Xu (Joe)
1307c950c4 bootstrap: add tracing and tracing-tree based tracing setup 2025-01-13 08:16:18 +08:00
许杰友 Jieyou Xu (Joe)
97d59c5af3 bootstrap: add optional tracing cargo feature and optional tracing* deps 2025-01-13 07:33:37 +08:00
Guillaume Gomez
223a7c1237
Rollup merge of #135411 - Urgau:unreach_pub-run-make, r=jieyouxu
run_make_support: add `#![warn(unreachable_pub)]`

This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) lint as warn in the `run_make_support` crate.

Related to https://github.com/rust-lang/compiler-team/issues/773

r? ``@jieyouxu``
2025-01-12 23:09:01 +01:00
Guillaume Gomez
80784f0f83
Rollup merge of #135407 - joshtriplett:more-clippy, r=compiler-errors
Deny various clippy lints

Almost all of these clippy lints have zero occurrences. Two of them have one each, and this PR fixes those.
2025-01-12 23:09:00 +01:00
Guillaume Gomez
9d3ae11c54
Rollup merge of #135348 - aDotInTheVoid:pathspathspaths, r=GuillaumeGomez
rustdoc-json: Include items in stripped modules in `Crate::paths`.

Closes #135309

When we're running rustdoc-json, we should err on the side of adding more items to `Cache::paths`, as that directly becomes `Crate::paths` in the output.

r? ``@GuillaumeGomez.`` Best reviewed commit-by-commit.
2025-01-12 23:08:57 +01:00
bors
627513a764 Auto merge of #135281 - onur-ozkan:build-stamps, r=jieyouxu
centralize build stamp logic

This PR brings all the stamp file handling into one place inside `build_stamp` module, which takes care of everything related to build stamps. By doing this, we cut down on duplicated code and types and keep the codebase easier to maintain and more consistent.

Main goals are:

- Make stamp handling stricter so we don't have to pass `Path`s around and manually `join` on arbitrary directories
- Keep all stamp-related logic in one place
- Make it easier to test and debug
- Avoid duplication
- Keep things simple and well-documented

Resolves #134962
2025-01-12 17:28:00 +00:00
Urgau
f25b0815a7 run_make_support: add #![warn(unreachable_pub)] 2025-01-12 16:12:34 +01:00
bors
7bb9888953 Auto merge of #135402 - matthiaskrgr:rollup-cz7hs13, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #129259 (Add inherent versions of MaybeUninit methods for slices)
 - #135374 (Suggest typo fix when trait path expression is typo'ed)
 - #135377 (Make MIR cleanup for functions with impossible predicates into a real MIR pass)
 - #135378 (Remove a bunch of diagnostic stashing that doesn't do anything)
 - #135397 (compiletest: add erroneous variant to `string_enum`s conversions error)
 - #135398 (add more crash tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-12 14:43:10 +00:00
Josh Triplett
af7bc3158a Deny clippy::four_forward_slashes in library (no occurrences) 2025-01-12 15:58:01 +02:00
Josh Triplett
fcc7803822 Deny clippy::to_string_in_format_args (no occurrences) 2025-01-12 15:29:56 +02:00
Josh Triplett
fb2e70690b Deny clippy::single_char_add_str (no occurrences) 2025-01-12 15:26:24 +02:00
Josh Triplett
57fcee8655 Deny clippy::same_item_push (no occurrences) 2025-01-12 15:24:29 +02:00
Josh Triplett
132e640fbf Deny clippy::print_literal (no occurrences) 2025-01-12 15:22:06 +02:00
Josh Triplett
e6056b54cf Deny clippy::needless_bool and clippy::needless_bool_assign (no occurrences) 2025-01-12 15:17:29 +02:00
Josh Triplett
fc683cbc0e Deny clippy::non_minimal_cfg (no occurrences) 2025-01-12 15:15:49 +02:00
Josh Triplett
3b262bdf24 Deny clippy::char_lit_as_u8 (no occurrences) 2025-01-12 15:11:58 +02:00
Josh Triplett
9c5b99dc92 Deny clippy:;four_forward_slashes and fix the only occurrence 2025-01-12 15:09:16 +02:00
Josh Triplett
e54264c509 Deny clippy::format_in_format_args and fix the only occurrence 2025-01-12 15:09:16 +02:00
bors
c0f6a1ce3f Auto merge of #135262 - mrkajetanp:ci-aarch64-dist-reland, r=Kobzol
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

Reland of #133809 now that the higher page sizes are fixed.

try-job: dist-aarch64-linux
try-job: dist-x86_64-linux
try-job: dist-i686-linux
2025-01-12 11:56:04 +00:00
Matthias Krüger
13805491b2
Rollup merge of #135389 - jieyouxu:fix-stage0-rustdoc-rmake, r=onur-ozkan
compiletest: include stage0-sysroot libstd dylib in recipe dylib search path

To fix some of the failures in `COMPILETEST_FORCE_STAGE0=1 ./x test run-make --stage 0`. Specifically,

```
COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/ --stage 0
```

should now pass.

Fixes #135373. (As in, make *some* of the `run-make` tests pass, other `run-make` tests fail for various reasons against stage0, and generally `run-make` tests are not guaranteed to pass at stage 0.)

cc `@lolbinarycat`

r? bootstrap
2025-01-12 09:14:14 +01:00
Matthias Krüger
6fa92eaf03
Rollup merge of #135375 - lolbinarycat:bootstrap-allow-stage0-rustdoc-js, r=jieyouxu
allow rustdoc-js tests to be run at stage0

this mirrors the behavior of rustdoc-js-std tests.

previously this required COMPILETEST_FORCE_STAGE0.
2025-01-12 09:14:13 +01:00
Rémy Rakic
33ce74f308 add error message to string_enum!s string conversions 2025-01-12 08:13:45 +00:00
Rémy Rakic
d19bdf9b48 add test for string_enum 2025-01-12 08:05:50 +00:00
onur-ozkan
2a4bcf597b update doc-comment of BuildStamp::add_stamp
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 10:15:36 +03:00
binarycat
d5f592ad58 rename run_js_doc_test to run_rustdoc_js_test 2025-01-12 00:21:31 -06:00
onur-ozkan
b03fba7ab4 rename done_stamp to lld_stamp
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:53:22 +03:00
onur-ozkan
b54d65230f rustc-dev-guide: update outdated LLVM stamp filename
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:47:57 +03:00
onur-ozkan
fae26e7ffa add change entry for renamings
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:46:58 +03:00
onur-ozkan
9611d8ea13 avoid magical AsRef<Path> implementation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:51 +03:00
onur-ozkan
dcc001adbb refactor with_stamp as add_stamp for incrementality
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:48 +03:00
onur-ozkan
99322a5158 extend sanitizers stamp calculation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:45 +03:00
onur-ozkan
216969b8c2 run git only inside the current directory
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:42 +03:00
onur-ozkan
ffd4c5b51c migrate lld build stamp
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:40 +03:00
onur-ozkan
bdb7518203 apply minor improvements on build_stamp
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:37 +03:00
onur-ozkan
a72068adee migrate program_out_of_date to BuildStamp::is_up_to_date
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:43:32 +03:00