298670 Commits

Author SHA1 Message Date
Matthias Krüger
172fc60e5f
Rollup merge of #143223 - nnethercote:improve-macro-stats-printing, r=petrochenkov
Improve macro stats printing

Fix a small formatting issue that has been annoying me.

r? ``@petrochenkov``
2025-06-30 20:49:43 +02:00
Matthias Krüger
d3c02b48df
Rollup merge of #143180 - jieyouxu:forest, r=Kobzol
Use `tracing-forest` instead of `tracing-tree` for bootstrap tracing

I find the `tracing-forest` output easier to comprehend.

Note that this is not a strict improvement -- `tracing-forest` output contains some emojis and redundant log levels, but customizing it seems to be... non-trivial. Despite this, I still find `tracing-forest` easier to follow than `tracing-tree`, even when I tried to tune `tracing-tree` output.

### Preview

```bash
BOOTSTRAP_TRACING=debug ./x test library/std --dry-run
```

With `tracing-forest` (this PR), it looks like

![Screenshot 2025-06-29 174802](https://github.com/user-attachments/assets/1ab9150f-48f8-4fb3-b004-27bcf8bbc0f5)

With `tracing-tree` (before this PR), it looked like

![Screenshot 2025-06-29 175227](https://github.com/user-attachments/assets/659e254d-15ab-47dd-af11-98e2331d4d7a)

r? `@Kobzol`
2025-06-30 20:49:42 +02:00
Matthias Krüger
1be0c62069
Rollup merge of #143175 - Kobzol:bootstrap-lld-external-llvm-config, r=Jieyouxu
Make combining LLD with external LLVM config a hard error

Younger me made this only a warning in https://github.com/rust-lang/rust/pull/139853, because our post-dist tests were relying on this. But that was not a good idea, because there are a bunch of places in bootstrap that outright try to build LLD/copy LLD to sysroot when `lld_enabled` is true (rightfully so), which is causing issues (https://github.com/rust-lang/rust/issues/143076). Instead of piling more hacks, I'd like to just disallow this, and if we need to use a hack, do it only for our CI.

If this breaks the CI post-dist tests, I'll either add some special environment variable for it, or, as an alternative, make the error back into a warning, but also disable `lld_enabled` when this situation happens.

try-job: dist-x86_64-linux

Fixes: https://github.com/rust-lang/rust/pull/143175
2025-06-30 20:49:41 +02:00
Matthias Krüger
8292936d74
Rollup merge of #143140 - RalfJung:ptr-into-parts, r=oli-obk
give Pointer::into_parts a more scary name and offer a safer alternative

`into_parts` is a bit too innocent of a name for a somewhat subtle operation.
r? `@oli-obk`
2025-06-30 20:49:41 +02:00
Matthias Krüger
8b8cd35edc
Rollup merge of #143019 - danielframpton:codegen-backend-parse, r=bjorn3
Ensure -V --verbose processes both codegen_backend and codegen-backend
2025-06-30 20:49:40 +02:00
Daniel Frampton
bb65bc8cba Ensure -V --verbose processes both codegen_backend and codegen-backend 2025-06-30 11:11:00 -07:00
bors
c65dccabac Auto merge of #143233 - dianqk:rollup-lcx3278, r=dianqk
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#142429 (`tests/ui`: A New Order [13/N])
 - rust-lang/rust#142514 (Miri: handling of SNaN inputs in `f*::pow` operations)
 - rust-lang/rust#143066 (Use let chains in the new solver)
 - rust-lang/rust#143090 (Workaround for memory unsafety in third party DLLs)
 - rust-lang/rust#143118 (`tests/ui`: A New Order [15/N])
 - rust-lang/rust#143159 (Do not freshen `ReError`)
 - rust-lang/rust#143168 (`tests/ui`: A New Order [16/N])
 - rust-lang/rust#143176 (fix typos and improve clarity in documentation)
 - rust-lang/rust#143187 (Add my work email to mailmap)
 - rust-lang/rust#143190 (Use the `new` method for `BasicBlockData` and `Statement`)
 - rust-lang/rust#143195 (`tests/ui`: A New Order [17/N])
 - rust-lang/rust#143196 (Port #[link_section] to the new attribute parsing infrastructure)
 - rust-lang/rust#143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again)
 - rust-lang/rust#143219 (Show auto trait and blanket impls for `!`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-30 14:28:58 +00:00
Jakub Beránek
5cf2a50da7
Add change tracker entry 2025-06-30 14:57:39 +02:00
bors
ad3b725761 Auto merge of #142839 - oli-obk:denullarification, r=RalfJung,celinval
Stop backends from needing to support nullary intrinsics

And then remove our infrastructure special casing them. Further improvements can now be done to them by avoiding the intermediate ConstValue step, but let's leave that to follow up work

r? `@RalfJung`
2025-06-30 11:24:47 +00:00
dianqk
c2904f7476
Rollup merge of #143219 - zachs18:patch-5, r=tgross35
Show auto trait and blanket impls for `!`

Add an empty `impl ! {}` so rustdoc shows auto trait impls and blanket impls on `!`'s documentation page.

This is already done for [unit](2f0ad2a71e/library/core/src/primitive_docs.rs (L493)), [tuples](2f0ad2a71e/library/core/src/primitive_docs.rs (L1148)), and [`fn` pointers](2f0ad2a71e/library/core/src/primitive_docs.rs (L1874)).

cc https://github.com/rust-lang/rust/pull/97842 ``@notriddle`` which added the same for unit and tuple.

<details><summary>Comparison</summary>

[Before (current):](https://doc.rust-lang.org/nightly/std/primitive.never.html)
![image](https://github.com/user-attachments/assets/eab8126d-8d65-46d4-8dc7-3680f3162ce3)

After:
![image](https://github.com/user-attachments/assets/e0868113-ebef-4c64-ac30-dfe740d7ea38)
</details>

``@rustbot`` label A-docs F-never_type
2025-06-30 19:23:22 +08:00
dianqk
e18342a7e8
Rollup merge of #143199 - jieyouxu:short-ice, r=RalfJung
Re-disable `tests/run-make/short-ice` on Windows MSVC again

We tried to re-enable this for MSVC in https://github.com/rust-lang/rust/pull/142844.

Unfortunately, this test still sometimes fails on Windows MSVC.
Tracked in https://github.com/rust-lang/rust/issues/143198.

FYI ```@dpaoliello``` (I couldn't reproduce this easily locally either)
2025-06-30 19:23:22 +08:00
dianqk
7760cd6154
Rollup merge of #143196 - Periodic1911:link_section, r=oli-obk
Port #[link_section] to the new attribute parsing infrastructure

Ports link_section to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

r? `@oli-obk`

cc `@JonathanBrouwer` `@jdonszelmann`
2025-06-30 19:23:21 +08:00
dianqk
327fe35db3
Rollup merge of #143195 - Kivooeo:tf17, r=tgross35
`tests/ui`: A New Order [17/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@tgross35`
2025-06-30 19:23:21 +08:00
dianqk
ab633af710
Rollup merge of #143190 - dianqk:new-method, r=oli-obk
Use the `new` method for `BasicBlockData` and `Statement`

This is the NFC part of rust-lang/rust#142771. I split it to make it easier to review for rust-lang/rust#142771. Even without rust-lang/rust#142771, I think this change is worthwhile.
2025-06-30 19:23:20 +08:00
dianqk
043fc5b230
Rollup merge of #143187 - yotamofek:mailmap, r=jieyouxu
Add my work email to mailmap
2025-06-30 19:23:20 +08:00
dianqk
462c7c3fd8
Rollup merge of #143176 - kilavvy:master, r=jieyouxu
fix typos and improve clarity in documentation

```
Description:

This pull request corrects minor typos and improves wording for clarity across several documentation files, including:

- Correcting instrinsics → intrinsics
- Correcting preferrably → preferably
- Correcting Orginally → Originally
-  Correcting resiliant → resilient

```
2025-06-30 19:23:19 +08:00
dianqk
8ccffc987a
Rollup merge of #143168 - Kivooeo:tf16, r=tgross35
`tests/ui`: A New Order [16/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@tgross35`

(just small one to test new method, also I should squash all this commits except move commit, so we after review will end up having like one move commit and one commit with changes, right?)
2025-06-30 19:23:18 +08:00
dianqk
3a35f36ae8
Rollup merge of #143159 - compiler-errors:freshen-re-error, r=oli-obk
Do not freshen `ReError`

Because `ReError` has `ErrorGuaranteed` in it, it affects candidate selection and thus causes incompleteness which leads to weirdness in eval. See the comment in the test.

Also remove an unnecessary `lookup_op_method` since it doesn't effect tests.

Fixes rust-lang/rust#132882.

r? types
2025-06-30 19:23:18 +08:00
dianqk
0952f86de3
Rollup merge of #143118 - Kivooeo:tf15, r=tgross35
`tests/ui`: A New Order [15/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@jieyouxu`
2025-06-30 19:23:17 +08:00
dianqk
a94f0a4af8
Rollup merge of #143090 - ChrisDenton:workaround1, r=tgross35
Workaround for memory unsafety in third party DLLs

Resolves rust-lang/rust#143078

Note that we can't make any guarantees if third parties intercept OS functions and don't implement them according to the documentation. However, I think it's practical to attempt mitigations when issues are encountered in the wild and the mitigation itself isn't too invasive.
2025-06-30 19:23:16 +08:00
dianqk
8c4bcb8625
Rollup merge of #143066 - compiler-errors:let-chain-solver, r=lcnr
Use let chains in the new solver

Self-explanatory

Let chains are stable as of today

r? lcnr
2025-06-30 19:23:16 +08:00
dianqk
d2dc99cc83
Rollup merge of #142514 - LorrensP-2158466:miri-float-nondet-pow, r=RalfJung
Miri: handling of SNaN inputs in `f*::pow` operations

fixes [miri/#4286](https://github.com/rust-lang/miri/issues/4286) and related to rust-lang/rust#138062 and [miri/#4208](https://github.com/rust-lang/miri/issues/4208#issue-2879058184).

For the following cases of the powf or powi operations, Miri returns either `1.0` or an arbitrary `NaN`:
- `powf(SNaN, 0.0)`
- `powf(1.0, SNaN)`
- `powi(SNaN, 0)`

Also added a macro in `miri/tests/pass/float.rs` which conveniently checks if both are indeed returned from such an operation.

Made these changes in the rust repo so I could test against stdlib, since these were impacted some time ago and were fixed in rust-lang/rust#138062. Tested with:
```fish
env MIRIFLAGS=-Zmiri-many-seeds ./x miri --no-fail-fast std core coretests -- f32 f64
```
This was successful. This does take a while, so I recommend using `--no-doc` and separate use of `f32` or `f64`

The pr is somewhat split up into 3 main commits, which implement the cases described above. The first commit also introduces the macro, and the last commit is just a global refactor of some things.

r? `@RalfJung`
2025-06-30 19:23:15 +08:00
dianqk
384d699893
Rollup merge of #142429 - Kivooeo:tf13, r=jieyouxu
`tests/ui`: A New Order [13/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? ```@jieyouxu```
2025-06-30 19:23:14 +08:00
Oli Scherer
d0bb9a73aa Try increasing the repetition limit 2025-06-30 08:04:40 +00:00
Oli Scherer
bd3205c02b Require either wrapping nullary intrinsincs in const blocks or explicitly deciding not to 2025-06-30 08:04:40 +00:00
Oli Scherer
d37a04d09d Remove the nullary intrinsic const eval logic and treat them like other intrinsics 2025-06-30 08:04:40 +00:00
Oli Scherer
672e0bec9e Stop backends from needing to support nullary intrinsics 2025-06-30 08:04:19 +00:00
Kivooeo
c240566561 cleaned up some tests 2025-06-30 12:45:47 +05:00
Kivooeo
1e3a2b2d4a cleaned up some tests 2025-06-30 11:23:01 +05:00
Kivooeo
580bc12844 cleaned up some tests 2025-06-30 11:16:18 +05:00
Nicholas Nethercote
e0761a57ab Improve macro-stats printing.
By allowing long names to overlap with the "Uses" field when it has
spare space. This avoids unnecessary line breaks in the output.
2025-06-30 13:33:51 +10:00
Nicholas Nethercote
25a6fd3213 Augment the macro-stats test.
With a long macro name that could fit on one line, but currently isn't
formatted that way, because the name would overlap with the maximum
width of the "Uses" column. (The next commit will fix this.)
2025-06-30 12:53:00 +10:00
bors
f19142044f Auto merge of #142941 - compiler-errors:shallow-bail, r=lcnr
Shallowly bail from `coerce_unsized` more

We do a *lot* of coercion in HIR typeck. Most of the time we're just coercing a type to itself, but we always try `coerce_unsized` even if it's not necessary.

Let's avoid doing that by adding a fast path to `coerce_unsized`; see the comment in that function.
2025-06-30 02:02:46 +00:00
zachs18
d98aaf7f80
Show auto trait and blanket impls for !
Add an empty `impl ! {}` so `rustdoc` generates auto trait impls and blanket impls on `!`'s documentation page.
2025-06-29 18:38:46 -05:00
Ralf Jung
67ab61e8ba add float_nan test for powf
plus various minor tweaks
2025-06-29 22:32:31 +02:00
LorrensP-2158466
60a48287d7 make some powf and powi cases involving SNaN non-deterministic 2025-06-29 22:25:41 +02:00
bors
35f6036521 Auto merge of #142802 - compiler-errors:dedup-analyses, r=lcnr
Collapse Analysis|Borrowck|PostBorrowckAnalysis when there are no opaques

r? lcnr
2025-06-29 19:12:29 +00:00
bors
ed2d759783 Auto merge of #143137 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-06-29 16:04:05 +00:00
Jieyou Xu
20d69c6c26
Re-disable tests/run-make/short-ice on Windows MSVC again 2025-06-29 22:29:12 +08:00
Anne Stijns
54cec0cf5a Port #[link_section] to the new attribute parsing infrastructure 2025-06-29 16:23:46 +02:00
Kivooeo
a38c78c461 moved tests 2025-06-29 18:06:00 +05:00
bors
5e749eb66f Auto merge of #143183 - GuillaumeGomez:rollup-g60lr91, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#142078 (Add SIMD funnel shift and round-to-even intrinsics)
 - rust-lang/rust#142214 (`tests/ui`: A New Order [9/N])
 - rust-lang/rust#142417 (`tests/ui`: A New Order [12/N])
 - rust-lang/rust#143030 (Fix suggestion spans inside macros for the `unused_must_use` lint)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-29 13:02:15 +00:00
dianqk
24e553e6bc
mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
dianqk
9f9cd5e283
mir: Add a new method to statement
Avoid introducing a large number of changes when adding optional initialization fields.
2025-06-29 20:13:36 +08:00
Yotam Ofek
71a841802d Add my work email to mailmap 2025-06-29 11:04:49 +00:00
Kivooeo
d0bd27924e cleaned up some tests 2025-06-29 15:37:33 +05:00
Guillaume Gomez
f9f3935fa7
Rollup merge of #143030 - Urgau:issue-143025, r=SparrowLii
Fix suggestion spans inside macros for the `unused_must_use` lint

This PR fixes the suggestion spans inside macros for the `unused_must_use` lint by trying to find the oldest ancestor span.

Fixes https://github.com/rust-lang/rust/issues/143025
2025-06-29 12:29:55 +02:00
Guillaume Gomez
05b209d3a2
Rollup merge of #142417 - Kivooeo:tf12, r=jieyouxu
`tests/ui`: A New Order [12/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@jieyouxu`
2025-06-29 12:29:55 +02:00
Guillaume Gomez
15b227f715
Rollup merge of #142214 - Kivooeo:tf9, r=jieyouxu
`tests/ui`: A New Order [9/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
2025-06-29 12:29:54 +02:00
Guillaume Gomez
66ad1f2abf
Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubilee
Add SIMD funnel shift and round-to-even intrinsics

This PR adds 3 new SIMD intrinsics

 - `simd_funnel_shl` - funnel shift left
 - `simd_funnel_shr` - funnel shift right
 - `simd_round_ties_even` (vector version of `round_ties_even_fN`)

TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`)

[#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286)

`@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics
r? `@workingjubilee`
2025-06-29 12:29:53 +02:00