1
Fork 0
Commit graph

278450 commits

Author SHA1 Message Date
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
Ayush Singh
1107382a18
path: Move is_absolute check to sys::path
I am working on fs support for UEFI [0], which similar to windows has prefix
components, but is not quite same as Windows. It also seems that Prefix
is tied closely to Windows and cannot really be extended [1].

This PR just tries to remove coupling between Prefix and absolute path
checking to allow platforms to provide there own implementation to check
if a path is absolute or not.

I am not sure if any platform other than windows currently uses Prefix,
so I have kept the path.prefix().is_some() check in most cases.

[0]: https://github.com/rust-lang/rust/pull/135368
[1]: https://github.com/rust-lang/rust/issues/52331#issuecomment-2492796137

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-01-13 11:52:03 +05:30
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
Noah Lev
5ccd6c04e5 rustdoc: Extract AttributesExt::lists trait method as function
The two implementations were identical, so there's no need to use a
trait method.
2025-01-12 20:34:13 -08:00
Noah Lev
e2fcdb8d36 rustdoc: Extract AttributesExt::cfg trait method as function
It's never overridden, so it shouldn't be on the trait.
2025-01-12 20:33:48 -08:00
Audrey Dutcher
7f743c7d1f bootstrap: do not rely on LIBRARY_PATH env variable
Clang will not respect this value in cross configurations.
2025-01-12 20:12:34 -07:00
Michael Goulet
9bf9f5db9b Assert that Instance::try_resolve is only used on body-like things 2025-01-13 02:20:08 +00:00
Michael Goulet
9cbd17778a Detect unstable lint docs that dont enable their feature 2025-01-13 02:04:05 +00:00
bors
047bc17d4f Auto merge of #135371 - Mark-Simulacrum:no-alloc-case-cmp, r=compiler-errors
Remove allocations from case-insensitive comparison to keywords

Follows up on work in 99d02fb40f, expanding the alloc-free comparisons to more cases of case-insensitive keyword matching.

r? ghost for perf
2025-01-13 02:00:41 +00:00
Antoni Boucher
b4418b896c Fix clippy warnings 2025-01-12 19:47:47 -05:00
Antoni Boucher
59689c43f3 Update to nightly-2025-01-12 2025-01-12 19:37:10 -05:00
Antoni Boucher
b44f3718bf Merge branch 'master' into sync_from_rust_2025_01_12 2025-01-12 19:29:42 -05: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
bors
e7ad3ae331 Auto merge of #135420 - GuillaumeGomez:rollup-93vepka, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #135348 (rustdoc-json: Include items in stripped modules in `Crate::paths`.)
 - #135365 (Update the explanation for why we use box_new in vec!)
 - #135383 (De-abstract tagged ptr and make it covariant)
 - #135401 (Remove some empty expected files to fix blessing)
 - #135406 (Update unstable lint docs to include required feature attributes)
 - #135407 (Deny various clippy lints)
 - #135411 (run_make_support: add `#![warn(unreachable_pub)]`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-12 23:08:30 +00: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
d8e88c9751
Rollup merge of #135406 - Aditya-PS-05:fix/unstable-lint-docs, r=compiler-errors
Update unstable lint docs to include required feature attributes

closes #135298

## Summary
This PR updates the documentation examples for the following unstable lints to ensure they include the necessary feature attributes for proper usage:

- fuzzy_provenance_casts
- lossy_provenance_casts
- unqualified_local_imports
- test_unstable_lint

## Changes Made:

- Added the appropriate #![feature(...)] attributes to the example code for each lint.
- Updated the examples to produce correct and meaningful warnings, ensuring they align with current lint behavior.

Reference:
- Used the `must_not_suspend` lint documentation as a template for these updates.
2025-01-12 23:08:59 +01:00
Guillaume Gomez
834f57555f
Rollup merge of #135401 - joshtriplett:empty-expected, r=lqd
Remove some empty expected files to fix blessing

https://github.com/rust-lang/rust/pull/134808 made --bless remove empty
expected files. Remove some empty files that were causing noise in
unrelated `--bless` invocations.
2025-01-12 23:08:59 +01:00
Guillaume Gomez
fad3039124
Rollup merge of #135383 - BoxyUwU:cov_tag_ptr, r=compiler-errors
De-abstract tagged ptr and make it covariant

In #135272 I needed to use a tagged ptr in `hir::TyKind` in order to not regress hir type sizes. Unfortunately the existing `CopyTaggedPtr` abstraction is insufficient as it makes the `'hir` lifetime invariant.

I spent some time trying to keep existing functionality while making it covariant but in the end I realised that actually we dont use *any* of this code *anywhere* in rustc, so I've just removed everything and replaced it with a much less general abstraction that is suitable for what I need in #135272.

Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷‍♀️
2025-01-12 23:08:58 +01:00
Guillaume Gomez
24cc0cb6fe
Rollup merge of #135365 - saethlin:box-new, r=compiler-errors
Update the explanation for why we use box_new in vec!

The perf run in this PR demonstrates that there is no longer a dramatic change in compile time with the intrinsic `box_new` vs calling `Box::new`, but I've locally confirmed that there is still a dramatic change in stack use.
2025-01-12 23:08:58 +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
48a426eca9 Auto merge of #135384 - saethlin:inline-copy-from-slice, r=joboet
Add #[inline] to copy_from_slice

I'm doing cooked things to CGU partitioning for compiler-builtins (https://github.com/rust-lang/rust/pull/135395) and this was the lone symbol in my compiler-builtins rlib that wasn't an intrinsic. Adding `#[inline]` makes it go away.

Perf report indicates a marginal but chaotic effect on compile time, marginal improvement in codegen. As expected.
2025-01-12 20:16:25 +00:00
Aditya-PS-05
7ece88a2d7 remove test_unstable_lint feature 2025-01-13 00:14:24 +05:30
antoyo
f03d3c4a56
Merge pull request #579 from klensy/typo
fix typo
2025-01-12 13:36:18 -05:00
antoyo
153fbfd5c4
Merge pull request #578 from rust-lang/sync_from_rust_2024_12_11
Sync from rust 2024/12/11
2025-01-12 13:34:01 -05:00
Ben Kimock
6024a06dba Update the explanation for why we use box_new in vec! 2025-01-12 13:17:16 -05: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
Antoni Boucher
93f7f2fdeb Add LTO test 2025-01-12 12:06:25 -05:00
Urgau
f25b0815a7 run_make_support: add #![warn(unreachable_pub)] 2025-01-12 16:12:34 +01:00
Boxy
4de8cefbdf De-abstract tagged pointer abstraction 2025-01-12 14:56:10 +00: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
Antoni Boucher
fe608c7639 Add ThinLTO test 2025-01-12 09:10:40 -05:00
Antoni Boucher
37a9e5069d Remove LTO warning 2025-01-12 09:06:40 -05:00
Aditya-PS-05
562107760d Update unstable lint docs to include required feature attributes 2025-01-12 19:31:05 +05:30
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