Commit graph

290184 commits

Author SHA1 Message Date
The Miri Cronjob Bot
da39cbec73 Merge from rustc 2025-05-25 05:01:19 +00:00
Ralf Jung
396c5cafe7 clean up old rintf leftovers 2025-05-25 09:24:28 +02:00
The Miri Cronjob Bot
5c65c35d26 Preparing for merge from rustc 2025-05-25 04:53:55 +00:00
bors
3d86494a0d Auto merge of #141518 - GuillaumeGomez:rollup-ivjep2j, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#140066 (Stabilize `<[T; N]>::as_mut_slice` as `const`)
 - rust-lang/rust#141105 (additional edge cases tests for `path.rs` 🧪 )
 - rust-lang/rust#141487 (Update askama to `0.14.0`)
 - rust-lang/rust#141498 (Use C-string literals to reduce boilerplate)
 - rust-lang/rust#141505 (rename internal panicking::try to catch_unwind)
 - rust-lang/rust#141511 (Cleanup CodegenFnAttrFlags)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-24 21:00:10 +00: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
c4a313ad06
Rollup merge of #141498 - tamird:cstr-example-noise, r=jhpratt
Use C-string literals to reduce boilerplate

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
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
Guillaume Gomez
284aaee0c1
Rollup merge of #141105 - GrantBirki:grantbirki/path-tests, r=jhpratt
additional edge cases tests for `path.rs` 🧪

This pull request adds a few new edge case tests to the `std::path` module. The new tests cover scenarios such as paths with only separators, non-ASCII and Unicode characters, embedded new lines, etc. Each new test is documented with some helpful in-line comments as well.
2025-05-24 21:23:48 +02:00
Guillaume Gomez
07157b78b1
Rollup merge of #140066 - thaliaarchi:const-array-as-mut-slice, r=jhpratt
Stabilize `<[T; N]>::as_mut_slice` as `const`

This is trivial and has no design questions.

Tracked in https://github.com/rust-lang/rust/issues/133333.

r? libs-api
2025-05-24 21:23:47 +02:00
Ralf Jung
8a7911019f
Merge pull request #4348 from RalfJung/urlfix
fix zulip topic URL
2025-05-24 18:50:05 +00: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
4bbcb47239 fix zulip topic URL 2025-05-24 20:19:30 +02:00
bors
5e16c66206 Auto merge of #141372 - khuey:ir_call_dbg_loc, r=jieyouxu
Use the fn_span when emitting function calls for better debug info.

This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc.

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-msvc-1
try-job: arm-android

r? `@jieyouxu`
2025-05-24 17:48:21 +00:00
Ralf Jung
1827bc0f39 rename internal panicking::try to catch_unwind 2025-05-24 16:32:00 +02:00
bors
038d599eda Auto merge of #141506 - matthiaskrgr:rollup-80f1geg, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #137323 (Guarantee behavior of transmuting `Option::<T>::None` subject to NPO)
 - #139254 (std: sys: net: uefi: Implement TCP4 connect)
 - #141432 (refactor `CanonicalVarKind`)
 - #141480 (document some -Z flags as living in the rustc-dev-guide)
 - #141486 (rustdoc book: add argument explanation for `html_playground_url`)
 - #141496 (Enable `[issue-links]` and `[no-mentions]` in triagebot)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-24 14:20:44 +00:00
Matthias Krüger
f84ffe29e1
Rollup merge of #141496 - Urgau:triagebot_issue_link_no-mentions, r=Kobzol
Enable `[issue-links]` and `[no-mentions]` in triagebot

This PR enables the [`[issue-links]`](https://forge.rust-lang.org/triagebot/issue-links.html) and [`[no-mentions]`](https://forge.rust-lang.org/triagebot/no-mentions.html) handlers of triagebot.

Most of our subtrees have already adopted them:
 - https://github.com/rust-lang/rust-analyzer/pull/19555
 - https://github.com/rust-lang/rust-clippy/pull/14563 & https://github.com/rust-lang/rust-clippy/pull/14576
 - https://github.com/rust-lang/rustc-dev-guide/pull/2335
 - https://github.com/rust-lang/miri/pull/4259
 - https://github.com/rust-lang/reference/pull/1788

r? `@Kobzol`
2025-05-24 16:08:48 +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
Matthias Krüger
4b8dcb5cf8
Rollup merge of #141432 - lcnr:canonicalize-regions, r=compiler-errors
refactor `CanonicalVarKind`

it's unnecessary. I don't believe we'll ever need to store additional info shared by all `CanonicalVarKind`s.

r? `@compiler-errors`
2025-05-24 16:08:46 +02:00
Matthias Krüger
d29204071b
Rollup merge of #139254 - Ayush1325:uefi-tcp4-connect, r=joboet
std: sys: net: uefi: Implement TCP4 connect

- Implement TCP4 connect using EFI_TCP4_PROTOCOL.
- Tested on QEMU setup with connecting to TCP server on host.
2025-05-24 16:08:46 +02:00
Matthias Krüger
334d7bd698
Rollup merge of #137323 - joshlf:transmute-npo, r=RalfJung
Guarantee behavior of transmuting `Option::<T>::None` subject to NPO

In https://github.com/rust-lang/rust/pull/115333, we added a guarantee that transmuting from `[0u8; N]` to `Option<P>` is sound where `P` is a pointer type subject to the null pointer optimization (NPO). It would be useful to be able to guarantee the inverse - that a `None::<P>` value can be transmutes to an array and that will yield `[0u8; N]`.

Closes #117591
2025-05-24 16:08:45 +02:00
Kyle Huey
9c234c03fd Disable test on android because it doesn't have backtraces. 2025-05-24 06:23:17 -07:00
Tamir Duberstein
7b5a079368
Use C-string literals to reduce boilerplate
Reduce boilerplate in doctests by replacing fallible function calls with
literals.
2025-05-24 08:34:16 -04:00
Urgau
f63a9b2b97 Enable [issue-links] and [no-mentions] in triagebot 2025-05-24 14:11:29 +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
8019d08ef9
Rollup merge of #141456 - Urgau:check-cfg-version-pred, r=jieyouxu
Suggest correct `version("..")` predicate syntax in check-cfg

This PR specialize the `unexpected_cfgs` lint diagnostic to suggest correct `version("..")` predicate syntax when providing the key-value one, eg. `version = "1.27"`.

Fixes https://github.com/rust-lang/rust/issues/141440
r? ``@jieyouxu``
2025-05-24 09:23:42 +02: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
b7e7260f52
Rollup merge of #141444 - zzzzzz8403:patch-1, r=Noratrieb
Improve CONTRIBUTING.md grammar and clarity

slight grammar changes for clarity
2025-05-24 09:23:41 +02:00
Matthias Krüger
3476b4951f
Rollup merge of #141438 - compiler-errors:dyn-compatible-call, r=lcnr
Do not try to confirm non-dyn compatible method

See the comment I left in `compiler/rustc_hir_typeck/src/method/confirm.rs`.

If we have a receiver that does not deref to the `dyn Trait` we're assembling the method from, then we used to ICE, but that's something that is possible to encounter with arbitrary self types.

r? oli-obk
Fixes https://github.com/rust-lang/rust/issues/141419
2025-05-24 09:23:40 +02:00
Matthias Krüger
293977aeb8
Rollup merge of #141429 - compiler-errors:unsafe-binder-non-structural-match, r=spastorino
Dont walk into unsafe binders when emiting error for non-structural type match

Fixes #141422.

The other two binder-having types are also special cased here, unsurprisingly.

r? oli-obk
2025-05-24 09:23:40 +02:00
Matthias Krüger
63a53555a1
Rollup merge of #141427 - fmease:dis-triagebot-glacier, r=Urgau
Disable `triagebot`'s `glacier` handler

Part of https://github.com/rust-lang/rust/issues/125459.
Unblocks https://github.com/rust-lang/triagebot/pull/2008.

r? Urgau
2025-05-24 09:23:39 +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
ijfjfj
25c759127b Improve CONTRIBUTING.md grammar and clarity
slight grammar changes for clarity
2025-05-23 23:03:06 +02:00
Ralf Jung
587653a2fc GetUserProfileDirectoryW is now documented to always store the size 2025-05-23 22:36:40 +02:00
bors
3e674b06b5 Auto merge of #141463 - matthiaskrgr:rollup-7k48ui3, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #138896 (std: fix aliasing bug in UNIX process implementation)
 - #140832 (aarch64-linux: Default to FramePointer::NonLeaf)
 - #141065 (Updated std doctests for wasm)
 - #141369 (Simplify `format_integer_with_underscore_sep`)
 - #141374 (make shared_helpers exe function work for both cygwin and non-cygwin hosts)
 - #141398 (chore: fix typos in comment)
 - #141457 (Update mdbook to 0.4.50)

Failed merges:

 - #141405 (GetUserProfileDirectoryW is now documented to always store the size)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-23 18:36:34 +00: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
be2705caf2
Rollup merge of #141398 - Dannyyy93:typos, r=Noratrieb
chore: fix typos in comment

## Fix Typos in Comments

This PR addresses several typos in the Rust standard library's documentation comments:

- In `library/std/src/sync/mpmc/list.rs`: Corrected "attemped" to "attempted"
- In `library/std/src/sys/thread_local/guard/key.rs`: Fixed "defering" to "deferring"
- In `library/std/src/sys/thread_local/guard/key.rs`: Fixed "futher" to "further"

These changes improve documentation readability and consistency without affecting any functional code.
2025-05-23 20:30:11 +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