Commit graph

313529 commits

Author SHA1 Message Date
joboet
aa73de400d
std: move RawOsError to sys::io 2025-12-15 13:48:30 +01:00
Kevaundray Wedderburn
9ba7852ddf refactor readme 2025-12-15 12:18:16 +00:00
Kevaundray Wedderburn
2846968f78 add riscv64im to ignore list for stage0 2025-12-15 12:18:16 +00:00
Kevaundray Wedderburn
1fe0a85df7 Add rv64IM 2025-12-15 12:17:55 +00:00
bors
ee447067e1 Auto merge of #150013 - matthiaskrgr:rollup-srl9jrb, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#149744 (test: update duplicate many_digits test to use f64 instead of f32)
 - rust-lang/rust#149946 (mir_build: Move and rename code for partitioning match candidates)
 - rust-lang/rust#149987 (Move ambient cdb discovery from compiletest to bootstrap)
 - rust-lang/rust#149990 (Improve amdgpu docs: Mention device-libs and xnack)
 - rust-lang/rust#149994 (Allow vector types for amdgpu)
 - rust-lang/rust#149997 (Link POSIX instead of Linux manual for Instant)
 - rust-lang/rust#150010 (Correct library linking for hexagon targets in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-15 12:08:30 +00:00
bjorn3
0e1e72a4e7 Remove dependencies field of CrateMetadata
It is always identical to the list of values in cnum_map.
2025-12-15 09:52:58 +00:00
bjorn3
aff1f2a0de Handle CrateOrigin::Injected in CrateOrigin::private_dep 2025-12-15 09:52:58 +00:00
bjorn3
c7a99e2029 Rename variants of CrateDepKind to be more descriptive
Perhaps the old name used to be accurate in the past, but nowadays most
injected dependencies are unconditionally linked too.
2025-12-15 09:52:57 +00:00
bjorn3
a0f8dffeee Use CrateDepKind::Explicit for the profiler runtime
It is unconditionally included.
2025-12-15 09:52:41 +00:00
Laurențiu Nicola
4e8f58cc2d
Merge pull request #21268 from rust-lang/rustc-pull
minor: Rustc pull update
2025-12-15 09:49:44 +00:00
bjorn3
7d57c6fc8e Rename dep_root field of CrateOrigin to dep_root_for_errors 2025-12-15 09:30:42 +00:00
Matthias Krüger
fa52c96965
Rollup merge of #150010 - androm3da:bcain/make_test_linkage, r=jieyouxu
Correct library linking for hexagon targets in run-make tests

Fixes the run-make test framework to use target-specific library linking instead of host-based detection. Previously, tests for hexagon targets failed because the framework used uname() to detect libraries to link, which returned Linux libraries (-lm -lrt -ldl -lpthread) that don't exist on all hexagon targets.

- Use target() instead of uname() to detect cross-compilation targets
- Add hexagon-specific library configuration (-lunwind -lclang_rt.builtins-hexagon)
- Maintain backward compatibility for host-native compilation

This enables hexagon tests to compile and link successfully with the appropriate runtime libraries for the hexagon platform.
2025-12-15 08:08:05 +01:00
Matthias Krüger
dc6fade06f
Rollup merge of #149997 - cvengler:posix-gettime, r=joboet
Link POSIX instead of Linux manual for Instant

This commit changes the links in the source code that link to a platform specific implementation of the POSIX interface of `clock_gettime`, despite the respective areas in the code being specifically UNIX system agnostic, thereby making it more reasonable to link the POSIX specific document.
2025-12-15 08:08:04 +01:00
Matthias Krüger
3e412faa66
Rollup merge of #149994 - Flakebi:amdgpu-vectors, r=jieyouxu
Allow vector types for amdgpu

The amdgpu target uses vector types in various places. The vector types can be used on all architectures, there is no associated target feature that needs to be enabled.

The largest vector type found in LLVM intrinsics is `v32i32` (`[32 x i32]`) for mfma intrinsics. Note that while this intrinsic is only supported on some architectures, the vector type itself is supported on all architectures.

Tracking issue: rust-lang/rust#135024

(I used an empty string to say “does not need a target feature”. If you prefer an `Option` or something like that, I’ll change it.)
2025-12-15 08:08:04 +01:00
Matthias Krüger
cebdc1a750
Rollup merge of #149990 - Flakebi:improve-amdgpu-docs, r=ehuss
Improve amdgpu docs: Mention device-libs and xnack

Mention amdgpu-device-libs for allocator and println support and mention the necessary target flag for GPUs from some some series without xnack support.

For the last half year, there were no major changes in the amdgpu-device-libs crate (in fact, there was no need to update the crate), so I believe it is stable enough to mention it here.

The xnack-support flag is something I stumbled upon recently, when more complex printlns failed on a certain GPU.

Tracking issue: rust-lang/rust#135024
2025-12-15 08:08:03 +01:00
Matthias Krüger
b9757a1602
Rollup merge of #149987 - Zalathar:ambient-cdb, r=jieyouxu
Move ambient cdb discovery from compiletest to bootstrap

- Follow-up to https://github.com/rust-lang/rust/pull/149710

---

As with the previous PR, this PR takes the compiletest code for discovering an “ambient” `cdb` in the user's path, and moves it to bootstrap.

The discovery code is indeed questionable, but improving it is out of scope for this PR.

r? jieyouxu
2025-12-15 08:08:02 +01:00
Matthias Krüger
450694c11a
Rollup merge of #149946 - Zalathar:buckets, r=Nadrieril
mir_build: Move and rename code for partitioning match candidates

I've always found it confusing that this code uses the word “sort” to describe partitioning candidates into buckets, since it isn't *sorting* them in the usual sense.

This PR therefore renames the relevant methods:
- `sort_candidates` → `partition_candidates_into_buckets`
- `sort_candidate` → `choose_bucket_for_candidate`

In addition, this PR moves those methods into their own `buckets` module, updates some comments to reflect the renaming, and also makes `partition_candidates_into_buckets` return a named struct instead of a tuple.

There should be no change to compiler behaviour.
2025-12-15 08:08:02 +01:00
Matthias Krüger
18fa9ddd77
Rollup merge of #149744 - lemire:main, r=Mark-Simulacrum
test: update duplicate many_digits test to use f64 instead of f32

Replace the f32 test case with an f64 equivalent to improve coverage for parsing large digit counts in double-precision floating-point conversion. Specifically, this PR updates the `many_digits` test in `library/coretests/tests/num/dec2flt/parse.rs` to test f64 (double-precision) parsing instead of f32 (single-precision).

The test verifies that decimal strings with an excessive number of digits (beyond `Decimal::MAX_DIGITS`) are parsed correctly, ensuring proper truncation of insignificant digits. Previously, the same test was repeated twice (see comment https://github.com/rust-lang/rust/pull/86761#issuecomment-3623334228 by `@Viatorus).`

## Changes

- Replaced the duplicated f32 test case with an equivalent f64 test case.
- Updated the expected bit pattern and input string to a very long decimal with many trailing zeros, testing the limits of f64 precision.
2025-12-15 08:08:01 +01:00
bors
693f365667 Auto merge of #149851 - dianqk:update-llvm, r=cuviper
Update LLVM submodule

Fixes rust-lang/rust#149250.

Update LLVM to 21.1.7 with some 21.1.8 patches. These patches have been backported to release/21.x.
2025-12-15 07:05:49 +00:00
The rustc-josh-sync Cronjob Bot
964d2922ff Format code 2025-12-15 04:30:49 +00:00
The rustc-josh-sync Cronjob Bot
8ab823e44d Merge ref '0208ee09be' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 0208ee09be
Filtered ref: 69b2702db74151cd410a028fb347c6e4e3f779dc
Upstream diff: dfe1b8c97b...0208ee09be

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-15 04:30:45 +00:00
The rustc-josh-sync Cronjob Bot
9dcd2efaa3 Prepare for merging from rust-lang/rust
This updates the rust-version file to 0208ee09be.
2025-12-15 04:25:42 +00:00
bors
52fda2e54f Auto merge of #149999 - matthiaskrgr:rollup-irr8kqi, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146794 (std: reorganize pipe implementations)
 - rust-lang/rust#148490 (dangling pointer from temp cleanup)
 - rust-lang/rust#149837 (Update `wrapping_sh[lr]` docs and examples)
 - rust-lang/rust#149864 (std: Don't use `linkat` on the `wasm32-wasi*` targets)
 - rust-lang/rust#149885 (replace addr_of_mut with &raw mut in maybeuninit docs)
 - rust-lang/rust#149949 (Cleanup of attribute parsing errors)
 - rust-lang/rust#149969 (don't use no_main and no_core to test IBT)
 - rust-lang/rust#149998 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-15 03:52:44 +00:00
Brian Cain
0c1612eb98 Implement va_arg for Hexagon Linux musl targets
Implements proper variadic argument handling for hexagon-unknown-linux-musl
targets using a 3-pointer VaList structure compatible with LLVM's
HexagonBuiltinVaList implementation.

* Handles register save area vs overflow area transition
* Provides proper 4-byte and 8-byte alignment for arguments
* Only activates for hexagon+musl targets via Arch::Hexagon & Env::Musl
2025-12-14 19:54:49 -06:00
Brian Cain
bf9a874b26 Correct library linking for hexagon targets in run-make tests
Fixes the run-make test framework to use target-specific library linking
instead of host-based detection. Previously, tests for hexagon targets
failed because the framework used uname() to detect libraries to link,
which returned Linux libraries (-lm -lrt -ldl -lpthread) that don't
exist on all hexagon targets.

- Use target() instead of uname() to detect cross-compilation targets
- Add hexagon-specific library configuration (-lunwind -lclang_rt.builtins-hexagon)
- Maintain backward compatibility for host-native compilation

This enables hexagon tests to compile and link successfully with the
appropriate runtime libraries for the hexagon platform.
2025-12-14 19:52:50 -06:00
Chayim Refael Friedman
337b2d1d9e
Merge pull request #21265 from J3m3/lint-attr-order
fix: respect rustc's lint attribute application order
2025-12-14 22:33:33 +00:00
Tshepang Mbambo
46db677010
Merge pull request #2697 from rust-lang/tshepang/link-to-ra-guide
Add rust-analyzer book link to the guide (part 2)
2025-12-14 22:27:43 +02:00
Tshepang Mbambo
a56a4fff27 less text for same effect 2025-12-14 22:25:39 +02:00
Redddy
164eec7f93 Add rust-analyzer book link to the guide 2025-12-14 22:24:11 +02:00
Matthias Krüger
b655ea3ac4
Rollup merge of #149998 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to b796ced408.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-14 20:04:58 +01:00
Matthias Krüger
98f87362d9
Rollup merge of #149969 - jyn514:ibt, r=jieyouxu
don't use no_main and no_core to test IBT

The previous test was quite fragile and depended on a bunch of internal features. Simplify it.

Split out of https://github.com/rust-lang/rust/pull/149937.

cc ```@jieyouxu``` ```@Oneirical```
2025-12-14 20:04:57 +01:00
Matthias Krüger
185f7dc044
Rollup merge of #149949 - JonathanBrouwer:error_cleanup, r=jdonszelmann
Cleanup of attribute parsing errors

Removes the specific `UnknownMetaItem` and `IllFormedAttributeInputLint` errors.
Note that `IllFormedAttributeInputLint` is not a lint, contrary to its name

r? ``````@jdonszelmann``````
2025-12-14 20:04:56 +01:00
Matthias Krüger
d05ddf5647
Rollup merge of #149885 - inkreasing:push-ovrwrllvzvmw, r=joboet
replace addr_of_mut with &raw mut in maybeuninit docs

In the docs for `addr_of_mut` it says that the macro is "soft-deprecated" so maybe the std docs should stop recommending it.
I searched for other places where this is used, but didn't find any in public stable documentation.
2025-12-14 20:04:56 +01:00
Matthias Krüger
ce2eec1b0c
Rollup merge of #149864 - alexcrichton:wasi-avoid-linkat, r=joboet
std: Don't use `linkat` on the `wasm32-wasi*` targets

This commit is a follow-up to rust-lang/rust#147572 and the issue reported at the end of that PR where the `std::fs::hard_link` function is broken after that PR landed. The true culprit and bug here is fixed in WebAssembly/wasi-libc#690 but until that's released in a wasi-sdk version it should be reasonable, on WASI, to skip the `linkat` function.
2025-12-14 20:04:55 +01:00
Matthias Krüger
a8460d0cf2
Rollup merge of #149837 - scottmcm:wrapping-shift-docs, r=workingjubilee
Update `wrapping_sh[lr]` docs and examples

Inspired by [#general > `Source` link for `core` items is often inscrutable @ 💬][zulip-thread] I wanted to add some more examples of the actual wrapping as well as update the documentation to emphasize that the behaviour is unusual.

In particular, now that `unbounded_sh[lr]` is stable, point people trying to avoid panics to that instead, since it behaves less weirdly.

[zulip-thread]: https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/.60Source.60.20link.20for.20.60core.60.20items.20is.20often.20inscrutable/near/562774474
2025-12-14 20:04:55 +01:00
Matthias Krüger
d7a18fc052
Rollup merge of #148490 - hkBst:dangling-ptr-lint-2, r=Urgau
dangling pointer from temp cleanup

Continuation of https://github.com/rust-lang/rust/pull/148348
r? `@Urgau`
2025-12-14 20:04:54 +01:00
Matthias Krüger
e4ca889ed8
Rollup merge of #146794 - joboet:reorganize-pipe, r=Mark-Simulacrum
std: reorganize pipe implementations

Currently, there are two distinct types called `AnonPipe` in `std`:
* The one used to implement `io::pipe` (in `sys::anonymous_pipe`)
* The one used to implement `Stdin`/`Stdout`/`Stderr` (in `sys::pal::pipe`)

On Windows, these actually have different semantics, as one of the handles returned by the `sys::pal::pipe` version is opened for asynchronous operation in order to support `read2`, whereas the `sys::anonymous_pipe` version does not do so. Thus the naming is extremely confusing.

To fix this, this PR renames the `sys::anonymous_pipe` version of `AnonPipe` to simply `Pipe`, whereas the `sys::pal::pipe` version is now called `ChildPipe`. Additionally,
* `sys::anonymous_pipe` is now also just called `sys::pipe`.
* On Windows, `sys::pal::pipe` has been moved to `sys::process` and is now called `sys::process::child_pipe`.
* On non-Windows platforms, pipe creation is now exclusively handled by `sys::pipe` and `ChildPipe` is defined as a type alias to `Pipe` within `sys::process`.

And lastly, the `read2` function (originally in `sys::pal::pipe`) is now called `read_output` and defined by `sys::process`, as (at least on Windows) it is only usable with `ChildPipe`.

Includes rust-lang/rust#146639 for convenience.
2025-12-14 20:04:53 +01:00
Clara Engler
1e4befda53
Link POSIX instead of Linux manual for Instant
This commit changes the links in the source code that link to a platform
specific implementation of the POSIX interface of `clock_gettime`,
despite the respective areas in the code being specifically UNIX system
agnostic, thereby making it more reasonable to link the POSIX specific
document.
2025-12-14 19:36:41 +01:00
Flakebi
a9b147259b
Allow vector types for amdgpu
The amdgpu target uses vector types in various places. The vector types
can be used on all architectures, there is no associated target feature
that needs to be enabled.

The largest vector type found in LLVM intrinsics is `v32i32`
(`[32 x i32]`) for mfma intrinsics. Note that while this intrinsic is
only supported on some architectures, the vector type itself is
supported on all architectures.
2025-12-14 17:03:51 +01:00
jyn
309e9ec576 don't use no_main and no_core to test IBT
also assert that the property is IBT and not some random other property.
2025-12-14 09:18:31 -05:00
Flakebi
efaa0c067f
Improve amdgpu docs: Mention device-libs and xnack
Mention amdgpu-device-libs for allocator and println support and mention
the necessary target flag for GPUs from some some series without xnack
support.

For the last half year, there were no major changes in the
amdgpu-device-libs crate (in fact, there was no need to update the
crate), so I believe it is stable enough to mention it here.

The xnack-support flag is something I stumbled upon recently, when more
complex printlns failed on a certain GPU.
2025-12-14 14:43:31 +01:00
Tshepang Mbambo
1a68b9429d
Merge pull request #2694 from rust-lang/tshepang-patch-1
about-this-guide.md: make more clear
2025-12-14 14:33:34 +02:00
bors
0208ee09be Auto merge of #149979 - ChrisDenton:rollup-9rvyn3h, r=ChrisDenton
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#148755 (Constify `DropGuard::dismiss` and trait impls)
 - rust-lang/rust#148825 (Add SystemTime::{MIN, MAX})
 - rust-lang/rust#149272 (Fix vec iter zst alignment)
 - rust-lang/rust#149417 (tidy: Detect outdated workspaces in workspace list)
 - rust-lang/rust#149773 (fix va_list test by adding a llvmir signext check)
 - rust-lang/rust#149894 (Update to mdbook 0.5)
 - rust-lang/rust#149955 (Fix typo in armv7a-vex-v5 documentation)
 - rust-lang/rust#149972 (Enable to ping LoongArch group via triagebot)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-14 12:32:36 +00:00
Tshepang Mbambo
69ba7c5bd3
about-this-guide.md: make more clear
My first thought seeing the sentence part of the list was that there was a missing hyperlink
2025-12-14 14:32:27 +02:00
Zalathar
5e42f8b22f Move ambient cdb discovery from compiletest to bootstrap 2025-12-14 23:16:05 +11:00
Marijn Schouten
cab911449a dangling pointer from temp cleanup 2025-12-14 11:39:43 +00:00
Lukas Wirth
3ab53e2b1d
Merge pull request #21225 from Veykril/push-wpzrmoxzttuz
internal: Give `FileSymbol` it's `'db` lifetime
2025-12-14 10:04:46 +00:00
Lukas Wirth
aecd399ac8 internal: Give FileSymbol it's 'db lifetime 2025-12-14 10:54:13 +01:00
Chris Denton
fbd259da35
Rollup merge of #149972 - heiher:ping-loongarch, r=jieyouxu
Enable to ping LoongArch group via triagebot
2025-12-14 09:18:30 +00:00
Chris Denton
5a450d0035
Rollup merge of #149955 - elijah629:patch-1, r=Noratrieb
Fix typo in armv7a-vex-v5 documentation

Fixed a typo in the platform support documentation for the `armv7a-vex-v5` target.
2025-12-14 09:18:30 +00:00