Commit graph

162409 commits

Author SHA1 Message Date
Jacob Pratt
905b46a6d4
Rollup merge of #141502 - marcoieni:x86_64-gnu-tools-codebuild, r=Kobzol
ci: move PR job x86_64-gnu-tools to codebuild
2025-05-26 03:38:18 +02:00
Jacob Pratt
6257d2fb1c
Rollup merge of #140863 - GuillaumeGomez:cleanup-tyalias-render, r=lolbinarycat
[rustdoc] Unify type aliases rendering with other ADT

Fixes #140739.

Better reviewed one commit at a time.

Just one thing I'm wondering: should we also render non-`repr` attributes? If so, I wonder if we shouldn't simply change `clean::TypeAlias` to contain the other ADT directly (`Struct`, `Enum` and `Union`) and remove the `TypeAlias::generics` field.

Can be done in a follow-up too.

cc ``@camelid``
r? ``@notriddle``
2025-05-26 03:38:16 +02:00
bjorn3
4aed799d34 Update tidy exceptions 2025-05-25 18:58:21 +00:00
Guillaume Gomez
ec97b0f0b5 Update to new API 2025-05-25 15:27:32 +02:00
Guillaume Gomez
5cc27332b5
Rollup merge of #141530 - ranger-ross:unstable-feature-doc-comments, r=Urgau
Added unstable feature doc comments to unstable book

This PR adds doc comments for unstables features in [compiler/rustc_feature/src/unstable.rs](d3a2440384/compiler/rustc_feature/src/unstable.rs (L190-L191)) to the unstable book feature pages.

Fixes rust-lang/rust#141528

Example features rendered

![image](https://github.com/user-attachments/assets/2b65f534-26f8-441f-ba29-65554c9154b7)

![image](https://github.com/user-attachments/assets/6077491b-ddaf-447e-9519-0bc110c7a893)

r? `@jyn514`
2025-05-25 15:11:49 +02:00
Guillaume Gomez
c747b7da6c
Rollup merge of #141508 - xtexx:gh-104200, r=onur-ozkan
bootstrap: clippy: set TESTNAME based on given paths

This addresses #104200 by setting the TESTNAME environment variable automatically based on the paths from run configs, marking a selected set of UI tests to be run.

Note that this does not filter out other unit tests using #[test].
2025-05-25 15:11:48 +02:00
Guillaume Gomez
3646a09811 Improve code 2025-05-25 15:10:50 +02:00
Guillaume Gomez
4f3dd7b018 Tweak attribute rendering depending on wether or not it is a type alias 2025-05-25 15:10:23 +02:00
Guillaume Gomez
eb9f05481b Rename the document_* argument/field into is_type_alias 2025-05-25 15:09:12 +02:00
Guillaume Gomez
4194745687 Split Item::attributes method into three 2025-05-25 15:08:23 +02:00
Guillaume Gomez
560aec13ba Unify rendering of type aliases without ADT items 2025-05-25 15:05:56 +02:00
Guillaume Gomez
5f857a9871 Rename clean::Enum::variants method into non_stripped_variants 2025-05-25 15:05:56 +02:00
Ross Sullivan
3850b1faa2
feat(unstable-book): Added unstable feature doc comments as feature descriptions 2025-05-25 20:00:14 +09:00
Jacob Pratt
045ac21c6f
Rollup merge of #139831 - lolbinarycat:rustdoc-mobile-sidebar, r=GuillaumeGomez
rustdoc: on mobile, make the sidebar full width and linewrap

this is because the mobile sidebar cannot be resized, unlike on desktop.
2025-05-25 04:00:55 +02:00
xtex
4350fd170e
bootstrap: clippy: set TESTNAME based on given paths
This addresses issue 104200 by setting the TESTNAME environment
variable automatically based on the paths from run configs,
marking a selected set of UI tests to be run.

Note that this does not filter out other unit tests using #[test].
2025-05-25 09:55:50 +08:00
Guillaume Gomez
7cd749deff
Rollup merge of #141511 - Noratrieb:codegen-fn-attrs, r=compiler-errors
Cleanup CodegenFnAttrFlags

- Rename `USED` to `USED_COMPILER` to better reflect its behavior.
- Reorder some items to group the used and allocator flags together
- Renumber them without gaps
2025-05-24 21:23:50 +02:00
Guillaume Gomez
76ca0e2d62
Rollup merge of #141505 - RalfJung:catch_unwind, r=Noratrieb
rename internal panicking::try to catch_unwind

The public function is called `catch_unwind`, the intrinsic at some point got renamed to `catch_unwind` -- there's no reason to have the internal implementation of this still be called `try`, so let's rename it to match the rest.
2025-05-24 21:23:49 +02:00
Guillaume Gomez
0846035d2d
Rollup merge of #141487 - GuillaumeGomez:update-askama, r=notriddle
Update askama to `0.14.0`

[Askama 0.14.0 release notes](https://github.com/askama-rs/askama/releases/tag/v0.14.0)

Just one change needed for a filter in rustdoc.

r? ```@notriddle```
2025-05-24 21:23:48 +02:00
Noratrieb
fa2bb599bc Cleanup CodegenFnAttrFlags
- Rename `USED` to `USED_COMPILER` to better reflect its behavior.
- Reorder some items to group the used and allocator flags together
- Renumber them without gaps
2025-05-24 20:31:37 +02:00
Ralf Jung
1827bc0f39 rename internal panicking::try to catch_unwind 2025-05-24 16:32:00 +02:00
Matthias Krüger
b0924297e1
Rollup merge of #141486 - xizheyin:issue-141414, r=GuillaumeGomez
rustdoc book: add argument explanation for `html_playground_url`

Fixes #141414

r? `@GuillaumeGomez`
2025-05-24 16:08:48 +02:00
Matthias Krüger
3e16a3ee9c
Rollup merge of #141480 - jyn514:treat-err-as-bug, r=jieyouxu
document some -Z flags as living in the rustc-dev-guide

i was looking for these but didn't find them at first; add a breadcrumb so people know where to look
2025-05-24 16:08:47 +02:00
MarcoIeni
ec5e841957
ci: move PR job x86_64-gnu-tools to codebuild 2025-05-24 15:12:14 +02:00
Guillaume Gomez
a6438924c9 Update askama version to 0.14.0 in citool 2025-05-24 12:31:21 +02:00
Guillaume Gomez
2885e5578e Update askama version to 0.14.0 in generate-copyright tool 2025-05-24 12:28:50 +02:00
Guillaume Gomez
f53473320a Update askama version to 0.14.0 in librustdoc 2025-05-24 12:23:18 +02:00
bors
3de4f1ccf3 Auto merge of #141484 - matthiaskrgr:rollup-dc58owu, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #141405 (GetUserProfileDirectoryW is now documented to always store the size)
 - #141427 (Disable `triagebot`'s `glacier` handler)
 - #141429 (Dont walk into unsafe binders when emiting error for non-structural type match)
 - #141438 (Do not try to confirm non-dyn compatible method)
 - #141444 (Improve CONTRIBUTING.md grammar and clarity)
 - #141446 (Add 2nd Solaris target maintainer)
 - #141456 (Suggest correct `version("..")` predicate syntax in check-cfg)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-24 10:00:14 +00:00
xizheyin
06e6c90204
rustdoc book: add argument explanation for html_playground_url
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-24 17:08:43 +08:00
Matthias Krüger
a89c33b290
Rollup merge of #141446 - psumbera:2nd-maintainer, r=RalfJung
Add 2nd Solaris target maintainer

Based on concenr here https://github.com/rust-lang/compiler-team/issues/870#issuecomment-2903825327 I propose my coleague ```@kulikjak``` as 2nd Solaris maintainer. He already did some work to Rust in past.
2025-05-24 09:23:42 +02:00
Matthias Krüger
48c4a46c8e
Rollup merge of #141405 - RalfJung:GetUserProfileDirectoryW, r=ChrisDenton
GetUserProfileDirectoryW is now documented to always store the size

Update to match https://github.com/MicrosoftDocs/sdk-api/pull/1810

Also fix a bug in the Miri implementation while I am starting at that code...

r? ```@ChrisDenton```
Fixes #141254
2025-05-24 09:23:39 +02:00
bors
5af801b687 Auto merge of #141415 - est31:let_chains_libcore, r=tgross35
Remove #![feature(let_chains)] from libcore

PR https://github.com/rust-lang/rust/pull/132833 has stabilized the let_chains feature. This PR removes the last occurrence from the library.

Split out of #140966 as it caused breakage. Now we have a patch to the linux tree that fixes the build, so we update the linux tree to it.

cc https://github.com/Rust-for-Linux/linux/issues/1163
cc https://github.com/rust-lang/rust/issues/140722
2025-05-24 06:49:47 +00:00
jyn
a56af95ed2 document some -Z flags 2025-05-24 01:14:39 -04:00
bors
105354db48 Auto merge of #141421 - nnethercote:TypeAliasPart-get, r=GuillaumeGomez
rustdoc: Speed up `TypeAliasPart::get`

Big speedups here on a couple of the benchmarks.

r? `@GuillaumeGomez`
2025-05-24 03:37:13 +00:00
Nicholas Nethercote
dfe8fe88f0 Simplify things a little more. 2025-05-24 07:48:22 +10:00
bors
80c34983c6 Auto merge of #141460 - weihanglo:update-cargo, r=weihanglo
Update cargo

9 commits in 47c911e9e6f6461f90ce19142031fe16876a3b95..68db37499f2de8acef704c73d9031be6fbcbaee4
2025-05-14 17:53:17 +0000 to 2025-05-22 14:27:15 +0000
- chore(gh): Add new-lint issue template (rust-lang/cargo#15575)
- fix(toml): Remove workaround for rustc frontmatter support (rust-lang/cargo#15570)
- fix(vendor)!: vendor files with .rej/.orig suffix (rust-lang/cargo#15569)
- fix(vendor)!: direct extraction for registry sources (rust-lang/cargo#15514)
- chore(deps): update msrv (1 version) to v1.87 (rust-lang/cargo#15530)
- Fix comment for cargo/core/compiler/fingerprint/mod.rs (rust-lang/cargo#15565)
- fix: remove unnecessary workaround in standard_lib test (rust-lang/cargo#15522)
- Allow configuring arbitrary codegen backends (rust-lang/cargo#15562)
- Update dependencies (rust-lang/cargo#15557)

r? ghost
2025-05-23 21:47:56 +00:00
Nicholas Nethercote
e01f40738f Move code inside the else in TypeAliasPart::get.
This is a huge perf win for rustdoc on the `typenum` and `nalgebra`
benchmarks, because the `else` branch doesn't get hit much.
2025-05-24 07:31:37 +10:00
Nicholas Nethercote
a7baf4bce4 Simplify the "is some" test in TypeAliasPart::get.
The comparison against `text` seems to be unnecessary.
2025-05-24 07:31:37 +10:00
Ralf Jung
587653a2fc GetUserProfileDirectoryW is now documented to always store the size 2025-05-23 22:36:40 +02:00
Matthias Krüger
ae3b69652e
Rollup merge of #141457 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook to 0.4.50

This updates mdbook to 0.4.50 which brings in several changes, and specifically a fix for syntax highlighting in rust-by-example.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0450
2025-05-23 20:30:12 +02:00
Matthias Krüger
8b69895ec2
Rollup merge of #141374 - jeremyd2019:patch-1, r=jieyouxu
make shared_helpers exe function work for both cygwin and non-cygwin hosts

On Cygwin, it needs to not append .exe, because /proc/self/exe (and therefore `std::env::current_exe`) does not include the .exe extension, breaking bootstrap's rustc wrapper.  On hosts other than Cygwin, it *does* need to append .exe because the file really does have a .exe extension, and non-Cygwin hosts won't be doing the same filename rewriting that Cygwin does when looking for a file X but finding only X.exe in its place.

Arising from discussion in https://github.com/rust-lang/rust/pull/140154#pullrequestreview-2855782812
``@mati865`` ``@Berrysoft``
2025-05-23 20:30:11 +02:00
Matthias Krüger
a4836e9965
Rollup merge of #141369 - yotamofek:pr/rustdoc/format_integer_with_underscore_sep, r=notriddle
Simplify `format_integer_with_underscore_sep`

Noticed that this helper fn only ever gets called with decimal-base-formatted ints, so can be simplified a lot by not trying to handle hex and octal radixes.
Second commit is completely unrelated, just simplified some code I wrote a while back 😁
2025-05-23 20:30:10 +02:00
Weihang Lo
11a6348820
Update cargo 2025-05-23 13:59:12 -04:00
Eric Huss
a12b455bd0 Update mdbook to 0.4.50 2025-05-23 09:37:23 -07:00
bors
e88e854634 Auto merge of #141437 - matthiaskrgr:rollup-jjagkxd, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #136400 (Improve handling of rustdoc lints when used with raw doc fragments.)
 - #140967 (Async drop poll shim for error dropee generates noop body)
 - #141019 (Update std doctests for android)
 - #141109 (discuss deadlocks in the std::io::pipe() example)
 - #141126 (rustdoc JSON: Don't apply `#[repr]` privacy heuristics)
 - #141376 (Rename `kw::Empty` as `sym::empty`.)
 - #141383 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-23 15:13:45 +00:00
Petr Sumbera
df61c7ad45 Add 2nd Solaris target maintainer 2025-05-23 15:31:01 +02:00
Yotam Ofek
5c735d154e Small cleanup for qpath_to_string 2025-05-23 12:37:56 +00:00
Yotam Ofek
5b47d340d3 Simplify format_integer_with_underscore_sep
Only ever needs to handle decimal reprs
2025-05-23 12:37:56 +00:00
Matthias Krüger
ee1768c2a3
Rollup merge of #141383 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-05-23 13:34:21 +02:00
Matthias Krüger
225ed8b9cf
Rollup merge of #141376 - nnethercote:rename-kw-Empty, r=petrochenkov
Rename `kw::Empty` as `sym::empty`.

Because the empty string is not a keyword.

r? `@petrochenkov`
2025-05-23 13:34:20 +02:00
Matthias Krüger
893494c90f
Rollup merge of #141126 - fmease:rev-rjson-priv-repr, r=aDotInTheVoid
rustdoc JSON: Don't apply `#[repr]` privacy heuristics

Split out from #116882.
Context: https://github.com/rust-lang/rust/pull/116882#issuecomment-2888349161.
Partially reverts #138018.

cc `@obi1kenobi`
r? aDotInTheVoid or rustdoc
2025-05-23 13:34:19 +02:00