Commit Graph

322302 Commits

Author SHA1 Message Date
bors 08cd08fbef Auto merge of #154482 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule



11 commits in e84cb639edfea2c42efd563b72a9be0cc5de6523..888f675344eb1cf2308fd53183e667bdd2c58e51
2026-03-21 01:27:07 +0000 to 2026-03-30 16:59:25 +0000
- chore: bump to curl-sys@0.4.87 (rust-lang/cargo#16808)
- fix(resolver): Better match rustc in error styling (rust-lang/cargo#16795)
- missing -Zjson-target-spec error: mention that this is a cargo flag (rust-lang/cargo#16793)
- Update changelog for 1.94.1 (rust-lang/cargo#16789)
- test(build): Make it easier to review `build.warnings` behavior (rust-lang/cargo#16788)
- test(build): Cover more behavior of `build.warnings` (rust-lang/cargo#16785)
- chore(deps): bump curl-sys from 0.4.83 to 0.4.86 (rust-lang/cargo#16786)
- Warn when installing with a non-default toolchain (rust-lang/cargo#16131)
- feat(cli): Add support for completing `--config` argument values with `native-completions` (rust-lang/cargo#16249)
- feat(cli): complete `--config` and `--color` before command (rust-lang/cargo#16780)
- chore(deps): bump rustls-webpki from 0.103.9 to 0.103.10 (rust-lang/cargo#16778)
2026-03-31 01:13:44 +00:00
Weihang Lo c575b7fe62 Update cargo submodule 2026-03-30 13:49:43 -04:00
bors cf7da0b727 Auto merge of #154573 - jhpratt:rollup-ABgmddY, r=jhpratt
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#154548 (Add regression test for TransmuteFrom ICE with min_generic_const_args)
 - rust-lang/rust#154563 (Point at binop lhs and rhs when expression is multiline)
 - rust-lang/rust#154564 (Tweak wording of E0275 WF errors)
 - rust-lang/rust#154566 (loongarch: use "_mcount" as the default mcount symbol)
2026-03-30 10:54:25 +00:00
Jacob Pratt 89eb3298db Rollup merge of #154566 - heiher:loong-mcount-sym, r=chenyukang
loongarch: use "_mcount" as the default mcount symbol

Set the `mcount` field to "_mcount" for all LoongArch targets to match Clang/GCC behavior [1]. This fixes linking failures when using `-Z instrument-mcount`, where the runtime expects "_mcount" instead of "mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
2026-03-30 05:13:18 -04:00
Jacob Pratt 7275f7e2e3 Rollup merge of #154564 - estebank:tweak-wf-errors, r=Kivooeo
Tweak wording of E0275 WF errors

Modify the main error message to read better:

```
error[E0275]: overflow evaluating whether `&'a mut Bar` is well-formed
```
2026-03-30 05:13:18 -04:00
Jacob Pratt a2cc7a9f0a Rollup merge of #154563 - estebank:multiline-binop, r=TaKO8Ki
Point at binop lhs and rhs when expression is multiline

```
error[E0277]: cannot add `()` to `u32`
  --> $DIR/multiline-span-simple.rs:13:18
   |
LL |       foo(1 as u32 +
   |           -------- ^ no implementation for `u32 + ()`
LL |
LL | /         bar(x,
LL | |
LL | |             y),
   | |______________-
```
2026-03-30 05:13:17 -04:00
Jacob Pratt e97324a04f Rollup merge of #154548 - jeanibarz:fix/add-test-150457, r=jieyouxu
Add regression test for TransmuteFrom ICE with min_generic_const_args

Regression test for rust-lang/rust#150457.

The wfcheck ICE with TransmuteFrom + min_generic_const_args was fixed by rust-lang/rust#150707 but didn't get a test.

Closes rust-lang/rust#150457
2026-03-30 05:13:17 -04:00
bors 4cf5f95802 Auto merge of #154572 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/f1297b21119565c626320c1ffc248965fffb2527.

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

r? @ghost
2026-03-30 07:41:45 +00:00
bors 116458d0a5 Auto merge of #154511 - nikic:revert-fastisel, r=dianqk
[perf] Revert FastISel patch

This caused a significant compile-time regression for debug builds.

There is another change (https://github.com/llvm/llvm-project/pull/186723) that mitigates that regression, but not fully. Revert it for now.
2026-03-30 02:02:59 +00:00
WANG Rui 6e984cd4bf loongarch: use "_mcount" as the default mcount symbol
Set the `mcount` field to "_mcount" for all LoongArch targets to match
Clang/GCC behavior [1]. This fixes linking failures when using
`-Z instrument-mcount`, where the runtime expects "_mcount" instead of
"mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
2026-03-30 07:53:20 +08:00
bors 80ad55752e Auto merge of #154559 - JonathanBrouwer:rollup-Iut0qjN, r=JonathanBrouwer
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#154074 (don't drop arguments' temporaries in `dbg!`)
 - rust-lang/rust#154328 (rustdoc: add missing {os,target,target_env} values for cfg pretty printer)
 - rust-lang/rust#154540 (Fix invalid type suggestion for item nested in function)
 - rust-lang/rust#154549 (Add regression test for recursive lazy type alias normalization ICE)
 - rust-lang/rust#153373 (Fix LegacyKeyValueFormat report from docker build: powerpc)
 - rust-lang/rust#154322 (feat: reimplement `hash_map!` macro)
 - rust-lang/rust#154416 (Add `IoSplit` diagnostic item for `std::io::Split`)
 - rust-lang/rust#154486 (std_detect on AArch64 Darwin: Detect FEAT_SVE_B16B16)
 - rust-lang/rust#154508 (Fix ambiguous parsing in bootstrap.py)
 - rust-lang/rust#154518 (Panic in Hermit clock_gettime)
 - rust-lang/rust#154530 (update zulip link in `std` documentation)
2026-03-29 22:49:44 +00:00
Esteban Küber 0740609ea3 Point at binop lhs and rhs when expression is multiline
```
error[E0277]: cannot add `()` to `u32`
  --> $DIR/multiline-span-simple.rs:13:18
   |
LL |       foo(1 as u32 +
   |           -------- ^ no implementation for `u32 + ()`
LL |
LL | /         bar(x,
LL | |
LL | |             y),
   | |______________-
```
2026-03-29 21:07:54 +00:00
Jonathan Brouwer de649f4462 Rollup merge of #154530 - fee1-dead-contrib:push-syplyyvkpsol, r=Noratrieb
update zulip link in `std` documentation

#docs doesn't seem to exist anymore, so point people to `t-libs`. Also include direct link to topic since Zulip is world-viewable now.
2026-03-29 21:39:31 +02:00
Jonathan Brouwer 95acbdfd8f Rollup merge of #154518 - stepancheg:hermit-panic, r=Mark-Simulacrum
Panic in Hermit clock_gettime

Follow-up to rust-lang/rust#154234.

r? @Mark-Simulacrum
2026-03-29 21:39:30 +02:00
Jonathan Brouwer 0d7708d25f Rollup merge of #154508 - Mark-Simulacrum:fix-ambiguous-parse, r=jieyouxu
Fix ambiguous parsing in bootstrap.py

Noticed this while trying to produce rustdoc-json for std and saw JSON output from the bootstrap.py build of bootstrap's Rust code. This is technically a breaking change, but I think the fix should be simple and arguably an improvement in future compatibility if/when the flag set changes.
2026-03-29 21:39:30 +02:00
Jonathan Brouwer ab05593ad9 Rollup merge of #154486 - pthariensflame:patch-1, r=Mark-Simulacrum
std_detect on AArch64 Darwin: Detect FEAT_SVE_B16B16

This is now exposed via `sysctl` as of macOS "Tahoe" 26.4 (or possibly earlier).
2026-03-29 21:39:29 +02:00
Jonathan Brouwer 46dcf270c2 Rollup merge of #154416 - vitkyrka:split-diag, r=Noratrieb
Add `IoSplit` diagnostic item for `std::io::Split`

Similar to the existing `IoLines` item.  It will be used in Clippy to detect uses of `Split` leading to infinite loops similar to the existing lint for `Lines`.
2026-03-29 21:39:29 +02:00
Jonathan Brouwer 880fe193a1 Rollup merge of #154322 - m4rch3n1ng:hash-map-macro, r=Mark-Simulacrum
feat: reimplement `hash_map!` macro

originally implemented in rust-lang/rust#144070, this had to be reverted in rust-lang/rust#148049 due to name ambiguity, as the macro was automatically put into the prelude. now, that rust-lang/rust#139493 has landed, it is possible to have a top-level macro, that is not exported by default, which should make it possible to reland this again.

implements rust-lang/rust#144032
implementation from rust-lang/rust#144070, original author has been added as co-author
effectively reverts rust-lang/rust#148049
2026-03-29 21:39:29 +02:00
Jonathan Brouwer db19e88173 Rollup merge of #153373 - homersimpsons:chore/fix-LegacyKeyValueFormat-powerpc, r=marcoieni
Fix LegacyKeyValueFormat report from docker build: powerpc

Part of rust-lang/rust#152305

r? @marcoieni
2026-03-29 21:39:28 +02:00
Jonathan Brouwer 59e6f0d826 Rollup merge of #154549 - jeanibarz:fix/add-test-152633, r=chenyukang
Add regression test for recursive lazy type alias normalization ICE

Regression test for rust-lang/rust#152633.

The normalization ICE with recursive lazy_type_alias + min_generic_const_args was fixed by rust-lang/rust#152040 but didn't get a test. Compiler now reports E0275 instead of crashing.

Closes rust-lang/rust#152633
2026-03-29 21:39:28 +02:00
Jonathan Brouwer 883eda3a72 Rollup merge of #154540 - chenyukang:yukang-fix-146786-unusable-path-suggestion, r=estebank
Fix invalid type suggestion for item nested in function

Fixes rust-lang/rust#146786

I also tried to add the `omit_parent` logic in pretty formatter here:
https://github.com/chenyukang/rust/blob/69b6d26d05006dca7556abc555fb0e029ecf1f4e/compiler/rustc_middle/src/ty/print/pretty.rs#L2240-L2295
so that we don't need to add `should_omit_parent_def_path` and `reset_path`.

but seems there will be duplicate print code with `default_print_def_path`.

maybe r? @estebank
2026-03-29 21:39:27 +02:00
Jonathan Brouwer 880c9e01ed Rollup merge of #154328 - scrabsha:push-tkozopuzoorz, r=lolbinarycat
rustdoc: add missing {os,target,target_env} values for cfg pretty printer
2026-03-29 21:39:27 +02:00
Jonathan Brouwer 2a18b885ce Rollup merge of #154074 - dianne:dbg-temp-scopes, r=Mark-Simulacrum
don't drop arguments' temporaries in `dbg!`

Fixes rust-lang/rust#153850

Credit to @theemathas for help with macro engineering ^^

r? libs
2026-03-29 21:39:26 +02:00
bors a25435bcf7 Auto merge of #154304 - zetanumbers:typeck_root, r=petrochenkov
Make typeck a tcx method which calls typeck_root query



Currently typeck query itself calls `tcx.typeck(tcx.typeck_root_def_id(key))` if its key isn't a type-check root. I thought this might be an overhead and made typeck a tcx method which calls typeck_root query instead.

This is a step to simplify `cache_on_disk_if` query modifier.

@petrochenkov please run perf
2026-03-29 19:37:29 +00:00
Esteban Küber dae0c01108 Tweak wording of E0275 WF errors
Modify the main error message to read better:

```
error[E0275]: overflow evaluating whether `&'a mut Bar` is well-formed
```
2026-03-29 18:25:55 +00:00
dianne 7d1b41cbb3 update diagnostic for variables moved by dbg! 2026-03-29 09:48:41 -07:00
bors cd14b73b4a Auto merge of #154459 - tgross35:destabilize-range-iter-remainder, r=scottmcm
core: Destabilize beta-stable `RangeInclusiveIter::remainder`



Destabilize `RangeInclusiveIter::remainder` and move `{RangeIter,RangefromIter}::remainder` to the `new_range_api` feature gate.

Original tracking issue: https://github.com/rust-lang/rust/issues/125687
New tracking issue: https://github.com/rust-lang/rust/issues/154458
Discussion: https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs-api.2Fapi-changes/topic/.60RangeFrom.3A.3Aremainder.60.20possible.20panic/with/582108913
2026-03-29 16:22:03 +00:00
Sasha Pourcelot 9f0944832b rustdoc: add missing target_{os,arch,env} values for cfg pretty printer 2026-03-29 16:02:23 +00:00
Sasha Pourcelot c67380d6fe rustdoc: add test showing cfg pretty-printing of all targets 2026-03-29 15:56:39 +00:00
Jean IBARZ 9fd2c9ef01 Add regression test for recursive lazy type alias normalization ICE
Exercises a self-referencing type alias with lazy_type_alias and
min_generic_const_args, which previously caused an ICE during
normalization.
2026-03-29 15:40:18 +02:00
Jean IBARZ 5e698662cd Add regression test for TransmuteFrom ICE with min_generic_const_args
Exercises TransmuteFrom with min_generic_const_args, which previously
caused an ICE in well-formedness checking.
2026-03-29 15:40:15 +02:00
dianne 51816efcc0 don't drop arguments' temporaries in dbg! 2026-03-29 06:38:38 -07:00
Shoyu Vanilla (Flint) 4095cfadb8 Merge pull request #21904 from A4-Tacks/no-panic-unmerge-trailing
fix: don't panic unmerge arm on trailing pipe
2026-03-29 12:38:44 +00:00
Laurențiu Nicola 912571e85f Merge pull request #21875 from rust-lang/dependabot/npm_and_yarn/editors/code/multi-bf05dc1ecf
Bump picomatch in /editors/code
2026-03-29 10:01:25 +00:00
Lukas Wirth 1c918ccaeb Merge pull request #21907 from Veykril/push-pswnwqokours
fix: Fix block lowering in ast id map
2026-03-29 09:31:30 +00:00
Lukas Wirth de6826beff fix: Fix block lowering in ast id map 2026-03-29 11:12:27 +02:00
yukang 69b6d26d05 fix invalid type suggestion for item nested in function 2026-03-29 16:23:14 +08:00
Trevor Gross 0bb3fe315e core: Move {RangeIter, RangeFromIter}::remainder to new_range_remainder
Split the remainder functions from the rest of `std::range`.
2026-03-29 02:11:32 -05:00
bors 584d32e3ee Auto merge of #154535 - JonathanBrouwer:rollup-jU7CiZw, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#153632 (Fix Vec::const_make_global for 0 capacity and ZST's)
 - rust-lang/rust#154190 (Don't fuse in `MapWindows`)
 - rust-lang/rust#154512 (Constify comparisons and `Clone` for `core::mem::Alignment`)
 - rust-lang/rust#154520 (Add doc links to `ExtractIf` of `BTree{Set,Map}` and `LinkedList`)
2026-03-29 07:00:59 +00:00
Jonathan Brouwer b7ea4b70db Rollup merge of #154520 - GrigorenkoPV:doc/extract_if, r=JohnTitor
Add doc links to `ExtractIf` of `BTree{Set,Map}` and `LinkedList`

There were links for `Hash{Set,Map}` and `Vec{,Deque}` versions, but not these three.
2026-03-29 08:59:39 +02:00
Jonathan Brouwer e32b188e72 Rollup merge of #154512 - GrigorenkoPV:alignment/const, r=scottmcm
Constify comparisons and `Clone` for `core::mem::Alignment`

As suggested in https://github.com/rust-lang/rust/pull/153261#issuecomment-4136817185
2026-03-29 08:59:37 +02:00
Jonathan Brouwer df5f98513b Rollup merge of #154190 - Jules-Bertholet:nonfused, r=scottmcm
Don't fuse in `MapWindows`

cc https://github.com/rust-lang/rust/issues/87155

Fusing makes the iterator larger, slower, more complicated, and less useful. Users who need fusing behavior can always use `.fuse()`, but there is no way to get non-fusing behavior from the fused version.

@rustbot label A-iterators
2026-03-29 08:59:36 +02:00
Jonathan Brouwer 8287d4deb2 Rollup merge of #153632 - Lars-Schumann:issue-153158, r=fee1-dead
Fix Vec::const_make_global for 0 capacity and ZST's

fixes https://github.com/rust-lang/rust/issues/153158
2026-03-29 08:59:35 +02:00
Trevor Gross cbc94349d0 core: Destabilize beta-stable RangeInclusiveIter::remainder
As discussed, make this portion of the range API unstable again. This
will now be tracked under `new_range_remainder`.

Discussion: https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs-api.2Fapi-changes/topic/.60RangeFrom.3A.3Aremainder.60.20possible.20panic/with/582108913
2026-03-29 01:58:50 -05:00
Deadbeef 64ee85d511 update zulip link in std documentation
#docs doesn't seem to exist anymore, so point people to `t-libs`.
Also include direct link to topic since Zulip is world-viewable now.
2026-03-29 01:02:53 -04:00
bors 148adf223e Auto merge of #154525 - GuillaumeGomez:rollup-hLPbuqn, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#153380 (stabilize new RangeFrom type and iterator)
 - rust-lang/rust#153834 (Merge `fabsf16/32/64/128` into `fabs::<F>`)
 - rust-lang/rust#154043 (simd_fmin/fmax: make semantics and name consistent with scalar intrinsics)
 - rust-lang/rust#154494 (triagebot: add reminder for bumping CI LLVM stamp)
 - rust-lang/rust#153374 (Fix LegacyKeyValueFormat report from docker build: dist-x86_64)
 - rust-lang/rust#154320 (`trim_prefix` for paths)
 - rust-lang/rust#154453 (Fix ice in rustdoc of private reexport)
 - rust-lang/rust#154504 (move many tests from `structs-enums` to `structs` or `enum`)
 - rust-lang/rust#154515 (Notify stdarch maintainers on changes in std_detect)
2026-03-29 01:57:54 +00:00
A4-Tacks afe522a754 fix: don't panic unmerge arm on trailing pipe
Example
---
```rust
fn main() {
    let y = match 0 {
        0 |$0 => { 1i32 }
        1 => { 2i32 }
    };
}
```

**Before this PR**

Panic on apply

**After this PR**

Assist not applicable
2026-03-29 08:53:43 +08:00
Guillaume Gomez 8c8e0c3074 Rollup merge of #154515 - sayantn:std-detect-notify, r=tgross35
Notify stdarch maintainers on changes in std_detect

cc @Amanieu @folkertdev @Kobzol

It would be nice to be notified when std_detect changes, as it is spiritually a part of stdarch.

Also assign @rust-lang/libs to std_detect
2026-03-29 00:06:53 +01:00
Guillaume Gomez c2fc360b96 Rollup merge of #154504 - cyrgani:structenum, r=Kivooeo
move many tests from `structs-enums` to `structs` or `enum`

This PR moves most of the tests in `ui/structs-enums` that are only about structs or only about enums to their respective directory, as a step towards removing `ui/structs-enums`.
Followup to rust-lang/rust#154131.
r? @Kivooeo
2026-03-29 00:06:53 +01:00
Guillaume Gomez 0ba684b705 Rollup merge of #154453 - chenyukang:yukang-fix-154383, r=notriddle
Fix ice in rustdoc of private reexport

Fixes rust-lang/rust#154383

The root cause is rustdoc could still try to resolve links for source docs that resolver did not cache in `ResolveDocLinks::Exported` mode. The test case will not crash with `--document-private-items` option, which will use `ResolveDocLinks::All`.

The fix makes rustdoc skip link resolution based on the source `DefId` of each doc fragment, so its behavior stays aligned with resolver's logic here: https://github.com/chenyukang/rust/blob/dc5cb1719eed6ac9275fe93d914d32141606b2ac/compiler/rustc_resolve/src/late.rs#L685
2026-03-29 00:06:52 +01:00