Commit graph

158144 commits

Author SHA1 Message Date
Matthias Krüger
e0e2f6a200
Rollup merge of #135476 - kleisauke:remove-asmjs-remnant, r=Kobzol
Remove remnant of asmjs

See: https://github.com/rust-lang/rust/issues/131467#issuecomment-2529314603.
2025-01-14 19:25:07 +01:00
Matthias Krüger
ca9a9d2f35
Rollup merge of #134880 - as1100k-forks:fix-rustdoc-json-path-name, r=aDotInTheVoid
Made `Path::name` only have item name rather than full name

Closes #134853

This PR makes `Path::name` to only have item name rather than full name, i.e. with the following code

```rust
pub mod foo {
    pub struct Bar;
}

pub fn get_bar() -> foo::Bar {
    foo::Bar
}
```
and running `./rustdoc ./demo.rs -wjson -Zunstable-options` gives:
```json
{
    "41": {
        "id": 41,
        "name": "get_bar",
        "inner": {
            "function": {
                "sig": {
                    "inputs": [],
                    "output": {
                        "resolved_path": {
                            "name": "Bar",
                            "id": 0,
                            "args": { "angle_bracketed": { "args": [], "constraints": [] }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
_Information which isn't useful here was trimmed_

r? aDotInTheVoid
2025-01-14 19:25:05 +01:00
Matthias Krüger
aeadee0642
Rollup merge of #134216 - GuillaumeGomez:jump-to-def-pats, r=fmease
Enable "jump to def" feature on patterns

Part of https://github.com/rust-lang/rust/issues/89095.

Pattern (as in "patterns in pattern matching") were not handled by the feature, it's now added.

It all started when I realized that prelude values like `Some` or `Err` were not getting a link generated either (added support for it in the first commit).

r? ``@fmease``
2025-01-14 19:25:04 +01: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
Kleis Auke Wolthuizen
3a66b97b9b Remove remnant of asmjs
See: https://github.com/rust-lang/rust/issues/131467#issuecomment-2529314603.
2025-01-14 10:49:32 +01:00
Aditya Kumar
2c4aee92fa
Made Path::name only have item name rather than full name 2025-01-14 06:03:43 +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