Commit Graph

291081 Commits

Author SHA1 Message Date
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
Ralf Jung
72386693b1 intrinsics: reduce references to LLVM and update notes on where the implementations live 2025-05-24 15:46:18 +02:00
bjorn3
0da0dac6ea Merge pull request #1574 from beetrees/f16-f128-mvp
Add `f16`/`f128` support
2025-05-24 15:38:31 +02:00
Kyle Huey
9c234c03fd Disable test on android because it doesn't have backtraces. 2025-05-24 06:23:17 -07:00
MarcoIeni
ec5e841957 ci: move PR job x86_64-gnu-tools to codebuild 2025-05-24 15:12:14 +02:00
beetrees
02195f56c7 Enable tests and compiler-builtins for f16/f128 2025-05-24 13:51:53 +01:00
beetrees
2055f01323 Add f16/f128 intrinsic support 2025-05-24 13:51:53 +01:00
beetrees
e46186f994 Add support for casting to and from f16/f128 2025-05-24 13:45:19 +01:00
beetrees
38d48dbe08 Add f16/f128 comparison support 2025-05-24 13:45:19 +01:00
beetrees
27a9590d3d Add f16/f128 +/-/*///% support 2025-05-24 13:45:19 +01:00
beetrees
87c425b9e1 Add basic support for f16/f128 values 2025-05-24 13:45:19 +01:00
beetrees
f0fb19ccc8 Add missing float libcalls to compiler_builtins.rs 2025-05-24 13:45:12 +01: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
Tamir Duberstein
947be5f431 add CStr::display
The implementation delegates to `<ByteStr as Display>::fmt`.

Link: https://github.com/rust-lang/libs-team/issues/550
Link: https://github.com/rust-lang/rust/issues/139984.
2025-05-24 08:24:52 -04:00
Jakub Beránek
4831646fc3 Merge pull request #2405 from Kobzol/remove-mentions-of-rust-lang-ci
Remove mentions of rust-lang-ci/rust
2025-05-24 14:14:56 +02: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
xizheyin
31ee840000 Add ui test func-pointer-issue-140491
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-24 16:33:02 +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
quininer
1758f07cb8 Enable xray support for Mac
* https://maskray.me/blog/2023-06-18-port-llvm-xray-to-apple-systems
* https://github.com/llvm/llvm-project/blob/llvmorg-20.1.4/clang/lib/Driver/XRayArgs.cpp#L31
2025-05-24 15:06:53 +08: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
Jason Newcomb
1029572c19 Optimize documentation lints **a lot** (2/2) (7.5% -> 1%) (#14870)
So, after https://github.com/rust-lang/rust-clippy/pull/14693 was
merged,
this is the continuation. It performs some optimizations on
`Fragments::span`
, makes it so we don't call it so much, and makes a 85.75% decrease
(7.51% -> 1.07%)
in execution samples of `source_span_for_markdown_range` and a 6.39% ->
0.88%
for `core::StrSearcher::new`. Overall a 13.11% icount decrase on
docs-heavy crates.

Benchmarked mainly on `regex-1.10.5`.

@rustbot label +performance-project

This means that currently our heaviest function is
`rustc_middle::Interners::intern_ty`, even
for documentation-heavy crates

Along with rust-lang/rust-clippy#14693, this makes the lint a 7% of what
it was before and makes it so that even in the most doc-heavy of crates
it's not an issue.

changelog:Optimize documentation lints by a further 85%

r? @Jarcho
2025-05-24 00:22:26 +00:00
Tshepang Mbambo
8b6010ab71 Merge pull request #2410 from rust-lang/tshepang-patch-1
typo
2025-05-24 01:42:06 +02:00
Tshepang Mbambo
9dd67e1104 typo 2025-05-24 01:38:43 +02:00
binarycat
bcca611b35 rustdoc-gui test: apply suggestions from code review 2025-05-23 17:43:19 -05: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
许杰友 Jieyou Xu (Joe)
3668fcfedf Merge pull request #2408 from chenyukang/yukang-add-llvm-link 2025-05-24 02:39:10 +08: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
yukang
8e91013d69 Add LLVM link in appendix 2025-05-24 02:30:23 +08: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