297873 Commits

Author SHA1 Message Date
Jakub Beránek
e433101882
Import stdarch history as a Josh subtree 2025-06-23 17:22:53 +02:00
Jakub Beránek
9510b476d5
Removed library/stdarch submodule 2025-06-23 17:22:38 +02:00
bors
ae2fc9722f Auto merge of #142792 - cuviper:version-1.90, r=cuviper
Bump the version number to 1.90.0

Part of the release process. This PR must not be rolled up.

r? cuviper
2025-06-23 09:36:06 +00:00
bors
22be76b7e2 Auto merge of #142901 - matthiaskrgr:rollup-topt4p6, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#141597 (Document subdirectories of UI tests with README files)
 - rust-lang/rust#142823 (Port `#[no_mangle]` to new attribute parsing infrastructure)
 - rust-lang/rust#142828 (1.88.0 release notes)
 - rust-lang/rust#142854 (centralize `-Zmin-function-alignment` logic)
 - rust-lang/rust#142875 (Check rustdoc-json-types FORMAT_VERSION is correctly updated)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-23 06:37:23 +00:00
Matthias Krüger
110492092c
Rollup merge of #142875 - GuillaumeGomez:rustdoc-json-types-version-update, r=Kobzol
Check rustdoc-json-types FORMAT_VERSION is correctly updated

Follow-up of https://github.com/rust-lang/rust/pull/142677.

``@nnethercote`` suggested that we should also ensure that the `FORMAT_VERSION` was only increased by 1 and we should check for it, this PR does it.

cc ``@aDotInTheVoid``
r? ghost
2025-06-23 06:07:21 +02:00
Matthias Krüger
57abad8cc5
Rollup merge of #142854 - folkertdev:centralize-min-function-alignment, r=workingjubilee
centralize `-Zmin-function-alignment` logic

tracking issue: https://github.com/rust-lang/rust/issues/82232
discussed in: https://github.com/rust-lang/rust/pull/142824#discussion_r2160056244

Apply the `-Zmin-function-alignment` value to the alignment field of the function attributes when those are created, so that individual backends don't need to consider it.

The one exception right now is cranelift, because it can't yet set the alignment for individual functions, but it can (and does) set the global minimum function alignment.

cc ``@RalfJung`` I think this is an improvement regardless, is there anything else that should be done for miri?
2025-06-23 06:07:20 +02:00
Matthias Krüger
2357fb05bb
Rollup merge of #142828 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
1.88.0 release notes

r? cuviper
2025-06-23 06:07:20 +02:00
Matthias Krüger
9b6665fafa
Rollup merge of #142823 - JonathanBrouwer:no_mangle_parser, r=jdonszelmann
Port `#[no_mangle]` to new attribute parsing infrastructure

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

r? ``@jdonszelmann``
2025-06-23 06:07:19 +02:00
Matthias Krüger
f63fdde764
Rollup merge of #141597 - Oneirical:unquestionable-instruction, r=jieyouxu
Document subdirectories of UI tests with README files

Part of rust-lang/rust#133895 and the [2025 Google Summer of Code](https://blog.rust-lang.org/2025/05/08/gsoc-2025-selected-projects/) associated project.

When adding a new UI test, one is faced with hundreds of subdirectories in `tests/ui` reflecting various categories. Knowing where to put the new test is not trivial, as many of the categories have slightly misleading names. For example, `moves` does not only refer to the `move` keyword but to functions taking ownership in general, whereas `allocator` does not refer to allocation in general but rather to the very specific `allocator_api` and `global_allocator` features.

Many contributors will therefore place their test at the top level of ̀`tests/ui` where it will be mixed with hundreds of unrelated tests.

This PR is a tentative move towards more clearly defined tag/categories, with a SUMMARY.md file documenting the true purpose of each subdirectory, placed inside `tests/ui`.

r? ``@jieyouxu``
2025-06-23 06:07:19 +02:00
bors
58d5e11690 Auto merge of #142898 - ehuss:update-cargo, r=ehuss
Update cargo

7 commits in 2251525ae503fa196f6d7f9ce6d32eccb2d5f044..84709f085062cbf3c51fa507527c1b2334015178
2025-06-16 22:01:27 +0000 to 2025-06-22 23:58:39 +0000
- Bump cargo-util-schemas version (rust-lang/cargo#15696)
- test(msrv): use a far future "newer" version (rust-lang/cargo#15693)
- Plumb rustc `-Zhint-mostly-unused` flag through as a profile option (rust-lang/cargo#15643)
- Disable lldb test, which seems to be broken due to issues with lldb (rust-lang/cargo#15687)
- docs(contrib): change clap URL to docs.rs/clap (rust-lang/cargo#15682)
- feat: Introduce perma unstable `--compile-time-deps` option for `cargo build` (rust-lang/cargo#15674)
- fix: Failing tests on rustc nightly (rust-lang/cargo#15679)
2025-06-23 03:38:39 +00:00
Eric Huss
74973d72fd Update cargo 2025-06-22 17:43:06 -07:00
bors
8387d61a6e Auto merge of #142728 - kornelski:string-track, r=tgross35
Let String pass #[track_caller] to its Vec calls

I've added `#[track_caller]` to `String` methods that delegate to `Vec` methods that already have `#[track_caller]`.

I've also added `#[track_caller]` to methods that have `assert!` or `panic!` due to invalid inputs.
2025-06-22 23:30:10 +00:00
Jonathan Brouwer
2084831cd5
Port #[no_mangle] to new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22 22:17:04 +02:00
bors
be19eda0dc Auto merge of #142508 - Mark-Simulacrum:skip-noop-drop-glue, r=fee1-dead
Skip no-op drop glue

Since rust-lang/rust#122662 this no longer gets used in vtables, so we're safe to fully
drop generating functions from vtables. Those are eventually cleaned up
by LLVM, but it's wasteful to produce them in the first place.

This doesn't appear to be a significant win (and shows some slight regressions) but
seems like the right thing to do. At minimum it reduces noise in the LLVM IR we generate,
which seems like a good thing.
2025-06-22 20:10:07 +00:00
bors
111e9bc64b Auto merge of #142878 - GuillaumeGomez:rollup-53dohob, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#142458 (Merge unboxed trait object error suggestion into regular dyn incompat error)
 - rust-lang/rust#142593 (Add a warning to LateContext::get_def_path)
 - rust-lang/rust#142594 (Add DesugaringKind::FormatLiteral)
 - rust-lang/rust#142740 (Clean-up `FnCtxt::is_destruct_assignment_desugaring`)
 - rust-lang/rust#142780 (Port `#[must_use]` to new attribute parsing infrastructure)
 - rust-lang/rust#142798 (Don't fail to parse a struct if a semicolon is used to separate fields)
 - rust-lang/rust#142856 (Add a few inline directives in rustc_serialize.)
 - rust-lang/rust#142868 (remove few allow(dead_code))
 - rust-lang/rust#142874 (cranelift: fix target feature name typo: "fxsr")
 - rust-lang/rust#142877 (Document why tidy checks if `eslint` is installed via `npm`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-22 17:10:28 +00:00
Oneirical
b433aba3df Add a SUMMARY.md outlining immediate subdirectories of the ui test suite
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2025-06-22 12:18:22 -04:00
Mark Rousskov
b4568d9135 Fix tests to drop now-skipped codegen 2025-06-22 12:03:42 -04:00
Guillaume Gomez
8da1a6290d
Rollup merge of #142877 - yotamofek:pr/rustdoc/comment-eslint-installation-req, r=GuillaumeGomez
Document why tidy checks if `eslint` is installed via `npm`

Discussion here: rust-lang/rust#142851
2025-06-22 17:35:37 +02:00
Guillaume Gomez
1474a0f505
Rollup merge of #142874 - marxin:cranelift-typo-fix, r=bjorn3
cranelift: fix target feature name typo: "fxsr"

Fix a typo introduced in 71b698c0b81c2e35c852ebcdf1f5cbe9e9162a50

CC: `@clubby789` `@bjorn3`
2025-06-22 17:35:36 +02:00
Guillaume Gomez
f1fa46d3ba
Rollup merge of #142868 - klensy:dc, r=oli-obk
remove few allow(dead_code)

Few from serial/parallel compiler leftovers and few from bootstrap.
2025-06-22 17:35:36 +02:00
Guillaume Gomez
0f89e61c4d
Rollup merge of #142856 - cjgillot:inline-serialize, r=petrochenkov
Add a few inline directives in rustc_serialize.

I see `debug_strict_add` and `debug_strict_sub` appearing in callgrind output. This bothers me. This PR should make them disappear.
2025-06-22 17:35:35 +02:00
Guillaume Gomez
194e58c75c
Rollup merge of #142798 - camsteffen:recover-semi, r=compiler-errors
Don't fail to parse a struct if a semicolon is used to separate fields

The first commit is a small refactor.
2025-06-22 17:35:35 +02:00
Guillaume Gomez
2681bb0952
Rollup merge of #142780 - JonathanBrouwer:must_use_new_attr, r=jdonszelmann
Port `#[must_use]` to new attribute parsing infrastructure

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

r? `@jdonszelmann`
2025-06-22 17:35:34 +02:00
Guillaume Gomez
a9a0753e96
Rollup merge of #142740 - ada4a:is-destruct-assignment-desugaring, r=fee1-dead
Clean-up `FnCtxt::is_destruct_assignment_desugaring`

I noticed the docstring thing and fixed that; then I thought I'd rewrite the method using let-chains while I'm at it, since that seemed appropriate. But I don't feel too strongly about the second change, so let me know if I should remove it
2025-06-22 17:35:34 +02:00
Guillaume Gomez
7bed341583
Rollup merge of #142594 - mejrs:new_desugaring, r=chenyukang
Add DesugaringKind::FormatLiteral

Implements `DesugaringKind::FormatLiteral` to mark the FormatArgs desugaring of format literals. The main use for this is to stop yapping about about formatting parameters if we're not anywhere near a format literal. The other use case is to fix suggestions such as https://github.com/rust-lang/rust/issues/141350. It might also be useful for new or existing diagnostics that check whether they're in a format-like macro.

cc `@xizheyin` `@fmease`
2025-06-22 17:35:33 +02:00
Guillaume Gomez
cab65efa2e
Rollup merge of #142593 - blyxyas:improve-docs-itty-bitty-change, r=compiler-errors
Add a warning to LateContext::get_def_path

Preventing anyone from doing the same error as https://github.com/rust-lang/rust-clippy/pull/15043 fixed
2025-06-22 17:35:33 +02:00
Guillaume Gomez
371426334b
Rollup merge of #142458 - oli-obk:dyn-incompat, r=compiler-errors
Merge unboxed trait object error suggestion into regular dyn incompat error

Another hir-walker removed from the well-formed queries. This error was always a duplicate of another, but it was able to provide more information because it could invoke `is_dyn_compatible` without worrying about cycle errors. That's also the reason we can't put the error directly into hir_ty_lowering when lowering a `dyn Trait` within an associated item signature. So instead I packed it into the error handling of wf obligation checking.
2025-06-22 17:35:32 +02:00
Yotam Ofek
90524da730 Document why tidy checks if eslint is installed via npm 2025-06-22 15:18:58 +00:00
Guillaume Gomez
1a3cba8384 Check rustdoc-json-types FORMAT_VERSION correct change 2025-06-22 16:47:40 +02:00
Martin Liska
75674e2c2a cranelift: fix target feature name type: "fxsr" 2025-06-22 16:32:54 +02:00
bors
c2ec7532ee Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obk
completely deduplicate `Visitor` and `MutVisitor`

r? oli-obk

This closes rust-lang/rust#127615.

### Discussion

> * Give every `MutVisitor::visit_*` method a corresponding `flat_map_*` method.

Not every AST node exists in a location where they can be mapped to multiple instances of themselves. Not every AST node exists in a location where they can be removed from existence (e.g. `filter_map_expr`). I don't think this is doable.

> * Give every `MutVisitor::visit_*` method a corresponding `Visitor` method and vice versa

The only three remaining method-level asymmetries after this PR are `visit_stmt` and `visit_nested_use_tree` (only on `Visitor`) and `visit_span` (only on `MutVisitor`).

`visit_stmt` doesn't seem applicable to `MutVisitor` because `walk_flat_map_stmt_kind` will ask `flat_map_item` / `filter_map_expr` to potentially turn a single `Stmt` to multiple based on what a visitor wants. So only using `flat_map_stmt` seems appropriate.

`visit_nested_use_tree` is used for `rustc_resolve` to track stuff. Not useful for `MutVisitor` for now.

`visit_span` is currently not used for `MutVisitor` already, it was just kept in case we want to revive rust-lang/rust#127241. cc `@cjgillot` maybe we could remove for now and re-insert later if we find a use-case? It does involve some extra effort to maintain.

* Remaining FIXMEs

`visit_lifetime` has an extra param for `Visitor` that's not in `MutVisitor`. This is again something only used by `rustc_resolve`. I think we can keep that symmetry for now.
2025-06-22 14:03:44 +00:00
Jonathan Brouwer
b24df42488
Port #[must_use] to new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22 14:51:58 +02:00
Mark Rousskov
43084f8c05
Indicate change is coming in the next release.
Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>
2025-06-22 08:15:15 -04:00
Ada Alakbarova
fdb76e2296
Turn a comment that looks like a docstring into a docstring
rewrite using let-chains
2025-06-22 13:37:14 +02:00
klensy
d092dc9381 remove few from bootstrap too 2025-06-22 13:24:05 +03:00
klensy
2ddbe39bfb remove allow(dead_code) leftovers from serial/parallel compiler 2025-06-22 13:05:09 +03:00
bors
a30f1783fe Auto merge of #142864 - jhpratt:rollup-mf0yq8o, r=jhpratt
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#140254 (Pass -Cpanic=abort for the panic_abort crate)
 - rust-lang/rust#142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - rust-lang/rust#142617 (improve search graph docs, reset `encountered_overflow` between reruns)
 - rust-lang/rust#142747 (rustdoc_json: conversion cleanups)
 - rust-lang/rust#142776 (All HIR attributes are outer)
 - rust-lang/rust#142800 (integer docs: remove extraneous text)
 - rust-lang/rust#142841 (Enable fmt-write-bloat for Windows)
 - rust-lang/rust#142845 (Enable textrel-on-minimal-lib for Windows)
 - rust-lang/rust#142850 (remove asm_goto feature annotation, for it is now stabilized)
 - rust-lang/rust#142860 (Notify me on tidy changes)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-22 09:49:14 +00:00
mejrs
29ce695cd4 Stop dbg! macro yapping about format modifiers 2025-06-22 10:58:27 +02:00
mejrs
b1d18129d1 Implement DesugaringKind::FormatLiteral 2025-06-22 10:58:25 +02:00
Jacob Pratt
34dd5362be
Rollup merge of #142860 - jieyouxu:notify-tidy, r=jieyouxu
Notify me on tidy changes

r? ghost
2025-06-22 08:49:07 +02:00
Jacob Pratt
f5b1c8e72c
Rollup merge of #142850 - tshepang:patch-1, r=jieyouxu
remove asm_goto feature annotation, for it is now stabilized

This was stabilized in https://github.com/rust-lang/rust/pull/133870
2025-06-22 08:49:07 +02:00
Jacob Pratt
b64292a0cc
Rollup merge of #142845 - dpaoliello:textrel-on-minimal-lib, r=jieyouxu
Enable textrel-on-minimal-lib for Windows

`bin_name` needs to be used when building a runnable executable.

Addresses item in rust-lang/rust#128602

---

try-job: x86_64-mingw-*
try-job: x86_64-msvc-*
try-job: i686-msvc-*
2025-06-22 08:49:07 +02:00
Jacob Pratt
cbfb65429c
Rollup merge of #142841 - dpaoliello:fmt-write-bloat, r=jieyouxu
Enable fmt-write-bloat for Windows

Seems to be working fine for MSVC once it has the correct binary name.

Addresses item in rust-lang/rust#128602

---

try-job: x86_64-mingw-*
try-job: x86_64-msvc-*
try-job: i686-msvc-*
2025-06-22 08:49:06 +02:00
Jacob Pratt
9f99a277ce
Rollup merge of #142800 - tshepang:extraneous, r=Mark-Simulacrum
integer docs: remove extraneous text

"Basic usage" implies there is an example that shows advanced usage, but these APIs are extra simple.
2025-06-22 08:49:05 +02:00
Jacob Pratt
bf63acfd35
Rollup merge of #142776 - dtolnay:hirattrstyle2, r=jdonszelmann
All HIR attributes are outer

Fixes https://github.com/rust-lang/rust/issues/142649. Closes https://github.com/rust-lang/rust/pull/142759.

All HIR attributes, including parsed and not yet parsed, will now be rendered as outer attributes by `rustc_hir_pretty`. The original style of the corresponding AST attribute(s) is not relevant for pretty printing, only for diagnostics.

r? ````@jdonszelmann````
2025-06-22 08:49:05 +02:00
Jacob Pratt
b5b106ab91
Rollup merge of #142747 - nnethercote:json-conversion-cleanups, r=aDotInTheVoid
rustdoc_json: conversion cleanups

A bunch of clean-to-types conversion cleanups I found while working on perf-related stuff in rustdoc_json.

r? ```@aDotInTheVoid```
2025-06-22 08:49:05 +02:00
Jacob Pratt
9c09dd51f9
Rollup merge of #142617 - lcnr:search_graph-3, r=compiler-errors
improve search graph docs, reset `encountered_overflow` between reruns

I think this shouldn't really matter for now. It will be more relevant for my current rework as we otherwise cannot partially reevaluate the root goal in case there has been overflow during the prervious iteration.

r? ````@BoxyUwU````
2025-06-22 08:49:04 +02:00
Jacob Pratt
431a822938
Rollup merge of #142600 - GrigorenkoPV:attributes/rustc_pub_transparent, r=jdonszelmann
Port `#[rustc_pub_transparent]` to the new attribute system

Very similar to rust-lang/rust#142498.

This is a part of rust-lang/rust#131229, so
r? ````@jdonszelmann````

---

For reference, the `#[rustc_pub_transparent]` attribute was created by me back in rust-lang/rust#129487.

As mentioned back in https://github.com/rust-lang/rust/pull/129487#discussion_r1730120385, this attribute does not check that it is applied to an ADT, because it checks that `#[repr(transparent)]` is also applied to the same item, which, in turn, should check for ADT.
2025-06-22 08:49:04 +02:00
Jacob Pratt
aef8a76ce0
Rollup merge of #140254 - bjorn3:rustc_panic_abort_abort, r=petrochenkov
Pass -Cpanic=abort for the panic_abort crate

The panic_abort crate must be compiled with panic=abort, but cargo doesn't allow setting the panic strategy for a single crate the usual way using `panic="abort"`, but luckily per-package rustflags do allow this. Bootstrap previously handled this in its rustc wrapper, but for example the build systems of cg_clif and cg_gcc don't use the rustc wrapper, so they would either need to add one, patch the standard library or be unable to build a sysroot suitable for both panic=abort and panic=unwind (as is currently the case).

Required for https://github.com/rust-lang/rustc_codegen_cranelift/issues/1567
2025-06-22 08:49:03 +02:00
bors
9972ebfcc2 Auto merge of #142675 - tmiasko:preserve-cache, r=oli-obk
Preserve caches in a call to shrink_to_fit

A small follow up to rust-lang/rust#142542.
2025-06-22 06:49:02 +00:00