305515 Commits

Author SHA1 Message Date
Stuart Cook
77ec4781c6
Rollup merge of #146415 - RalfJung:s390x-softfloat, r=workingjubilee
s390x: mark soft-float target feature as incompatible

This provides a more informative warning when someone manually sets `+soft-float` on s390x.
2025-09-11 14:06:31 +10:00
Stuart Cook
c69a792137
Rollup merge of #146380 - rperier:unify_and_dedup_bits_conv_float_tests, r=tgross35
Unify and deduplicate bits conv float tests

cc rust-lang/rust#141726

This is a proposal to unify and deduplicate the bits conv tests for f16, f32, f64 and f128
2025-09-11 14:06:30 +10:00
Stuart Cook
c79c990df1
Rollup merge of #146379 - madsmtm:fix-platform_version-test, r=tgross35
Fix `compare_against_sw_vers` test

The `saturating_sub` doesn't actually perform its intended since the version numbers are signed integers (which I changed in a later revision of https://github.com/rust-lang/rust/pull/138944).

Fixes the issue described in https://github.com/rust-lang/rust/pull/138944#issuecomment-3270662876.

r? tgross35
2025-09-11 14:06:29 +10:00
Stuart Cook
88b51304f9
Rollup merge of #146370 - heiher:update-loong-linux-docs, r=jieyouxu
Update the LoongArch target documentation

This patch defines minimum CPU feature requirements, updates toolchain baseline, and streamlines maintainer list:

- Specify double-precision floating-point and LSX as mandatory CPU features
- Raise the minimum required binutils version to 2.42+, due to relocations introduced by the default medium code model
- Remove outdated maintainers to reduce irrelevant notifications

r? `@jieyouxu`
2025-09-11 14:06:29 +10:00
Stuart Cook
f38c788d84
Rollup merge of #146347 - folkertdev:duplicate-symbol-panic, r=fee1-dead
report duplicate symbols added by the driver

The panic message did not mention what symbols were duplicates, which made the panic hard to debug. This came up in [#t-compiler/help > Easiest way to find offending duplicate symbols](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Easiest.20way.20to.20find.20offending.20duplicate.20symbols/with/538295740).

This behavior was introduced in https://github.com/rust-lang/rust/pull/138682.

r? ```@fee1-dead```
2025-09-11 14:06:28 +10:00
Stuart Cook
cc51a7efeb
Rollup merge of #146335 - arielb1:dont-dump-core, r=nnethercote
disable core dumps for panic-uninitialized-zeroed

That test causes a large amount of crashes. If a system has a /proc/sys/kernel/core_pattern that uploads core dumps enabled, it will take a long time to complete. Set dumpable to 0 to avoid that.

Before:
```
$ time ./panic-uninitialized-zeroed

real    0m47.457s
user    0m0.023s
sys     0m0.021s
```

After:
```
$ ./panic-uninitialized-zeroed

real    0m0.029s
user    0m0.019s
sys     0m0.010s
```
2025-09-11 14:06:27 +10:00
Stuart Cook
602841dc8c
Rollup merge of #142315 - lolbinarycat:core-dedup-ptr-docs-139190-pt3, r=workingjubilee
core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref

also add INFO.md file explaining the purpose of the ptr/docs dir, and give some pointers (heh) to future maintainers.

follow up to rust-lang/rust#142101

part of rust-lang/rust#139190

r? `@workingjubilee`
2025-09-11 14:06:26 +10:00
Jieyou Xu
b38a86f4d7
Revert "Rollup merge of #122661 - estebank:assert-macro-span, r=petrochenkov"
This reverts commit 1eeb8e8b151d1da7daa73837a25dc5f7a1a7fa28, reversing
changes made to 324bf2b9fd8bf9661e7045c8a93f5ff0ec1a8ca5.

Unfortunately the assert desugaring change is not backwards compatible,
see RUST-145770.

Code such as

```rust
#[derive(Debug)]
struct F {
    data: bool
}

impl std::ops::Not for F {
  type Output = bool;
  fn not(self) -> Self::Output { !self.data }
}

fn main() {
  let f = F { data: true };

  assert!(f);
}
```

would be broken by the assert desugaring change. We may need to land
the change over an edition boundary, or limit the editions that the
desugaring change impacts.
2025-09-11 09:10:46 +08:00
Jieyou Xu
fc58d8f5cc
Add regression test for assert desugaring change
Using the MCVE reported in RUST-145770.
2025-09-11 09:09:31 +08:00
Daniel Paoliello
458f3873d6 Bump miow to 0.60.1 2025-09-10 15:39:13 -07:00
Jonathan 'theJPster' Pallant
409a1fbcba
Update aarch64-unknown-none.md to include -softfloat too 2025-09-10 23:37:46 +01:00
Jonathan 'theJPster' Pallant
5a742229ec
Add aarch64-unknown-none to SUMMARY.md 2025-09-10 23:37:08 +01:00
Jonathan 'theJPster' Pallant
3d3769a0d3
Add missing links in platform-support.md 2025-09-10 23:36:11 +01:00
Christian Poveda
a7528e7ec3
Improve core::array coverage 2025-09-10 17:25:24 -05:00
Christian Poveda Ruiz
789c8408ec
Update library/coretests/tests/ops.rs
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2025-09-10 16:50:45 -05:00
Christian Poveda
5f2b04652f
Improve core::ops coverage 2025-09-10 16:32:04 -05:00
bors
f4665ab836 Auto merge of #146418 - matthiaskrgr:rollup-za0lrux, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#145327 (std: make address resolution weirdness local to SGX)
 - rust-lang/rust#145879 (default auto traits: use default supertraits instead of `Self: Trait` bounds on associated items)
 - rust-lang/rust#146123 (Suggest examples of format specifiers in error messages)
 - rust-lang/rust#146311 (Minor symbol comment fixes.)
 - rust-lang/rust#146322 (Make Barrier RefUnwindSafe again)
 - rust-lang/rust#146327 (Add tests for deref on pin)
 - rust-lang/rust#146340 (Strip frontmatter in fewer places)
 - rust-lang/rust#146342 (Improve C-variadic error messages: part 2)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-10 21:30:05 +00:00
León Orell Valerian Liehr
f5dad62d4c
Less greedily parse [const] bounds 2025-09-10 23:24:31 +02:00
León Orell Valerian Liehr
1558e65c9e
Restore the test intention of several MBE trait bound modifier tests 2025-09-10 23:24:31 +02:00
Ralf Jung
3b2178336f s390x: mark soft-float target feature as incompatible 2025-09-10 22:47:29 +02:00
Sasha Pourcelot
b152974301 tidy: check that error messages don't start with a capitalized letter 2025-09-10 21:45:07 +02:00
Jonathan 'theJPster' Pallant
f1abb70836
Pick up changes from robamu that I missed.
From https://github.com/thejpster/rust/pull/1.
2025-09-10 20:31:09 +01:00
Jonathan 'theJPster' Pallant
faf0e14eed
Update the arm-* and aarch64-* platform docs.
The Rust Embedded Devices Working Group (wg-embedded) Arm Team (t-arm)
agreed to listed as maintainers of:

* aarch64-unknown-none
* aarch64-unknown-none-softfloat
* armv7a-none-eabi
* armv7r-none-eabi
* armv7r-none-eabihf

The aarch64-unknown-none* target didn't have a page so I added it.

wg-embedded t-arm did not want to take over:

* armebv7r-none-eabi
* armebv7r-none-eabihf

So I gave them their own target page. The current maintainer remains.
2025-09-10 19:51:39 +01:00
Jana Dönszelmann
dbd3ef1332
fixup no_{core,std} handling code 2025-09-10 11:45:24 -07:00
Matthias Krüger
bb45ea3acc
Rollup merge of #146342 - folkertdev:c-variadic-errors-take-3, r=workingjubilee
Improve C-variadic error messages: part 2

tracking issue: https://github.com/rust-lang/rust/issues/44930

a reimplementation of https://github.com/rust-lang/rust/pull/143546 that builds on https://github.com/rust-lang/rust/pull/146165.

This PR

- disallows coroutines (e.g. `async fn`) from having a `...` argument
- disallows associated functions (both in traits and standard impl blocks) from having a `...` argument
- splits up a generic "ill-formed C-variadic function" into specific errors about using an incorrect ABI, not specifying an ABI, or missing the unsafe keyword

C-variadic coroutines probably don't make sense? C-variadic functions are for FFI purposes, combining that with async functions seems weird.

For associated functions, we're just cutting scope. It's probably fine, but it's probably better to explicitly allow it. So for now, at least give a more targeted error message.

Made to be reviewed commit-by-commit.

cc `@workingjubilee`
r? compiler
2025-09-10 20:29:10 +02:00
Matthias Krüger
86d39a0673
Rollup merge of #146340 - fmease:frontmatter-containment, r=fee1-dead,Urgau
Strip frontmatter in fewer places

* Stop stripping frontmatter in `proc_macro::Literal::from_str` (RUST-146132)
* Stop stripping frontmatter in expr-ctxt (but not item-ctxt!) `include`s (RUST-145945)
* Stop stripping shebang (!) in `proc_macro::Literal::from_str`
  * Not a breaking change because it did compare spans already to ensure there wasn't extra whitespace or comments (`Literal::from_str("#!\n0")` already yields `Err(_)` thankfully!)
* Stop stripping frontmatter+shebang inside some rustdoc code where it doesn't make any observable difference (see self review comments)
* (Stop stripping frontmatter+shebang inside internal test code)

Fixes https://github.com/rust-lang/rust/issues/145945.
Fixes https://github.com/rust-lang/rust/issues/146132.

r? fee1-dead
2025-09-10 20:29:09 +02:00
Matthias Krüger
868226b8b2
Rollup merge of #146327 - Darksonn:pin-deref-tests, r=lcnr
Add tests for deref on pin

Tests split out from rust-lang/rust#145608.

r? `@lcnr`
2025-09-10 20:29:08 +02:00
Matthias Krüger
d061896a37
Rollup merge of #146322 - weiznich:fix/146087, r=joboet
Make Barrier RefUnwindSafe again

This commit manually implements `RefUnwindSafe` for `std::sync::Barrier` to fix rust-lang/rust#146087. This is a fix for a regression indroduced by e95db591a4
2025-09-10 20:29:07 +02:00
Matthias Krüger
4a834b54d4
Rollup merge of #146311 - nnethercote:symbol-comments, r=petrochenkov
Minor symbol comment fixes.

- The empty symbol is no longer a keyword.
- I don't think any of the special reserved identifiers are used for error recovery.

r? ```@petrochenkov```
2025-09-10 20:29:06 +02:00
Matthias Krüger
f48c1d85b2
Rollup merge of #146123 - IoaNNUwU:issue-68293, r=estebank
Suggest examples of format specifiers in error messages

Format macro now suggests adding `{}` if no formatting specifiers are present. It also gives an example:
```rust
LL |     println!("Hello", "World");
   |              -------  ^^^^^^^ argument never used
   |              |
   |              formatting specifier missing
   |
   = note: format specifiers use curly braces: `{}`
help: consider adding format specifier
   |
LL |     println!("Hello{}", "World");
   |                    ++
```
When one or more `{}` are present, it doesn't show 'format specifiers use curly braces: `{}`' and example, just small hint on how many you missing:
```rust
LL |     println!("list: {}", 1, 2, 3);
   |              ----------     ^  ^ argument never used
   |              |              |
   |              |              argument never used
   |              multiple missing formatting specifiers
   |
   = help: consider adding 2 format specifiers
```

Original issue: rust-lang/rust#68293
Based on discussion in this PR: rust-lang/rust#76443

Let me know if something is missing
2025-09-10 20:29:06 +02:00
Matthias Krüger
fc6beb3034
Rollup merge of #145879 - Bryanskiy:supertraits-2, r=lcnr
default auto traits: use default supertraits instead of `Self: Trait` bounds on associated items

First commit: the motivation has been discussed [here](https://github.com/rust-lang/rust/pull/144679).

Second commit:  the only new places where new implicit `DefaultAutoTrait` bounds are generated are supertraits and trait object so `?Trait` syntax should be extended to these places only.

r? `@lcnr`
2025-09-10 20:29:05 +02:00
Matthias Krüger
e79630da0b
Rollup merge of #145327 - joboet:net-addr-sgx-hack, r=tgross35
std: make address resolution weirdness local to SGX

Currently, the implementations of `TcpStream::connect` and its cousins take an `io::Result<&SocketAddr>` as argument, which is very weird, as most of them then `?`-try the result immediately to access the actual address. This weirdness is however necessitated by a peculiarity of the SGX networking implementation:

SGX doesn't support DNS resolution but rather accepts hostnames in the same place as socket addresses. So, to make e.g.
```rust
TcpStream::connect("example.com:80")`
```
work, the DNS lookup returns a special error (`NonIpSockAddr`) instead, which contains the hostname being looked up. When `.to_socket_addrs()` fails, the `each_addr` function used to select an address will pass the error to the inner `TcpStream::connect` implementation, which in SGX's case will inspect the error and try recover the hostname from it. If
that succeeds, it continues with the found hostname.

This is pretty obviously a terrible hack and leads to buggy code (for instance, when users use the result of `.to_socket_addrs()` in their own `ToSocketAddrs` implementation to select from a list of possible URLs, the only URL used will be that of the last item tried). Still, without changes to the SGX usercall ABI, it cannot be avoided.

Therefore, this PR aims to minimise the impact of that weirdness and remove it from all non-SGX platforms. The inner `TcpStream::connect`, et al. functions now receive the `ToSocketAddrs` type directly and call `each_addr` (which is moved to `sys::net::connection`) themselves. On SGX, the implementation uses a special `each_addr` which contains the whole pass-hostname-through-error hack.

As well as making the code cleaner, this also opens up the possibility of reusing newly created sockets even if a connection request fails – but I've left that for another PR.

CC `@raoulstrackx`
2025-09-10 20:29:04 +02:00
Guillaume Gomez
7966ae0f33 Simplify code for find_raw_urls 2025-09-10 20:02:30 +02:00
Guillaume Gomez
3205e4db0f Add new ui tests for rustdoc::bare_urls 2025-09-10 18:44:20 +02:00
Guillaume Gomez
5a36fe2387 Improve suggestion in case a bare URL is surrounded by brackets 2025-09-10 18:44:20 +02:00
clubby789
11a22b3090 tidy: Add specific line info for allowed dependencies 2025-09-10 17:19:51 +01:00
clubby789
adfb6ec089 tidy: More accurate permitted dependencies location 2025-09-10 17:13:21 +01:00
clubby789
ba874d38a5 tidy: Print crate name on dependency error 2025-09-10 17:07:28 +01:00
binarycat
d50a80e1d0 core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref
also add INFO.md file explaining the purpouse of the ptr/docs dir.
2025-09-10 11:00:08 -05:00
clubby789
cb819729d0 tidy: Introduce WorkspaceInfo struct for deps information 2025-09-10 16:56:36 +01:00
bors
565a9ca63e Auto merge of #146409 - matthiaskrgr:rollup-thju381, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#144765 (inclusive `Range`s: change `end` to `last`)
 - rust-lang/rust#146178 (Implement `#[rustc_align_static(N)]` on `static`s)
 - rust-lang/rust#146368 (CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commits)
 - rust-lang/rust#146378 (Update wasm-component-ld to 0.5.17)
 - rust-lang/rust#146391 (Trim paths less in MIR dumping)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-10 15:09:18 +00:00
Ralf Jung
72225060ed clarify current MIR semantics re: overlapping assignment
and double-check that we match it in codegen
2025-09-10 15:59:11 +02:00
Ralf Jung
8ecda4b7f8 interpret: fix overlapping aggregate initialization 2025-09-10 15:59:11 +02:00
joboet
4c99219959
std: only test dlsym! on platforms where it is actually used
`dlsym` doesn't work for finding libc symbols on platforms like linux-musl, so the test will fail.
2025-09-10 15:34:38 +02:00
joboet
f049b6147c
bless miri tests 2025-09-10 15:26:18 +02:00
joboet
ad08577a50
std: move thread into sys 2025-09-10 15:26:17 +02:00
Romain Perier
b1c4e19e13 Unify and deduplicate bits conv float tests 2025-09-10 14:25:36 +02:00
Matthias Krüger
212baec446
Rollup merge of #146391 - beepster4096:trimnt, r=saethlin
Trim paths less in MIR dumping

With this PR, the paths MIR dump filters and that are printed at the start of a dump file are no longer trimmed. They don't include the crate that is being compiled, however.
2025-09-10 14:17:40 +02:00
Matthias Krüger
29cbf41517
Rollup merge of #146378 - alexcrichton:update-wasm-component-ld, r=lqd
Update wasm-component-ld to 0.5.17

Keeping this up-to-date as the project itself, and its dependencies, are updated.
2025-09-10 14:17:39 +02:00
Matthias Krüger
f0bf4f3d6b
Rollup merge of #146368 - ojeda:rfl, r=lqd
CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commits

v6.17-rc5 contains the equivalent of the two commits we had here, thus move the Rust for Linux job forward to that so that we don't need the temporary commits anymore.

r? ```@lqd``` ```@Kobzol```
try-job: x86_64-rust-for-linux
```@rustbot``` label A-rust-for-linux
```@bors``` try
2025-09-10 14:17:39 +02:00