Commit graph

317541 commits

Author SHA1 Message Date
khyperia
e6f5b97152 MGCA: require #[type_const] on free consts too 2026-02-06 15:35:18 +01:00
bors
035b01b794 Auto merge of #152213 - JonathanBrouwer:rollup-trjCgZZ, r=JonathanBrouwer
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#152191 (Convert to inline diagnostics in `rustc_hir_analysis`)
 - rust-lang/rust#149329 (Mark match arms in try and for as being from desugarings.)
 - rust-lang/rust#151474 (Minor structural improvements)
 - rust-lang/rust#152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - rust-lang/rust#152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - rust-lang/rust#152136 (Consolidate type const checks on `tcx.is_type_const`)
 - rust-lang/rust#152140 (Hard code the error code registry for custom drivers)
 - rust-lang/rust#152155 (Fix typos in riscv64a23-unknown-linux-gnu.md)
 - rust-lang/rust#152170 (Port `rustc_effective_visibility` to the new attribute parser)
 - rust-lang/rust#152182 (update compiler stable backport zulip msg)
 - rust-lang/rust#152184 (Port rustc_abi to the attribute parser)
 - rust-lang/rust#152195 (update openmp/offload builds to LLVM 22, Part 1)
 - rust-lang/rust#152202 (chore: clearify tidy's error message)

Failed merges:

 - rust-lang/rust#151744 (fix refining_impl_trait suggestion with return_type_notation)
 - rust-lang/rust#152212 (Port some attributes to the attr parser)
2026-02-06 09:12:28 +00:00
Jonathan Brouwer
2a01963b22
Rollup merge of #152202 - nyurik:better-msg, r=jieyouxu
chore: clearify tidy's error message

it took me a while to realize this error was due to the name of the file, not the file's content
2026-02-06 10:06:48 +01:00
Jonathan Brouwer
8420a080da
Rollup merge of #152195 - ZuseZ4:update-offload-llvm22-A, r=jieyouxu
update openmp/offload builds to LLVM 22, Part 1

This part of the update of OpenMP/Offload to LLVM 22 does not depend on a backport in the future LLVM release candidate 3. Let's therefore merge it first, to unblock existing users/developers.

r? @jieyouxu
2026-02-06 10:06:48 +01:00
Jonathan Brouwer
0cc62c81e5
Rollup merge of #152184 - Ozzy1423:attrs3, r=jdonszelmann
Port rustc_abi to the attribute parser

Tracking issue: https://github.com/rust-lang/rust/issues/131229

This attribute either dumps the abi info for functions (debug arg)
or if you put it on a pair of fn ptr's it checks they match (assert_eq arg)

r? @JonathanBrouwer
2026-02-06 10:06:47 +01:00
Jonathan Brouwer
6db1e097f6
Rollup merge of #152182 - apiraino:update-compiler-stable-backport-zulip-msg, r=jieyouxu
update compiler stable backport zulip msg

I'd like to update the message when stable backports (for t-compiler) Zulip topics are opened.

Stable backports mention the channel i.e. also people who might not have context, example:
[#t-compiler/backports > #150590: stable-nominated @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23150590.3A.20stable-nominated/near/569989784)

Beta backports mention author+reviewer (which fits better), example:
[#t-compiler/backports > #151896: beta-nominated @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23151896.3A.20beta-nominated/near/571171604)

This patch makes the `stable` backport opening message just like the `beta` backport one.

Thanks
2026-02-06 10:06:47 +01:00
Jonathan Brouwer
19f4c05129
Rollup merge of #152170 - jdonszelmann:port-rustc-effective-visibility, r=JonathanBrouwer
Port `rustc_effective_visibility` to the new attribute parser

r? @JonathanBrouwer
2026-02-06 10:06:46 +01:00
Jonathan Brouwer
19840e1bb7
Rollup merge of #152155 - wolfv:patch-1, r=wesleywiser
Fix typos in riscv64a23-unknown-linux-gnu.md
2026-02-06 10:06:45 +01:00
Jonathan Brouwer
d96d73fd86
Rollup merge of #152140 - bjorn3:driver_fixed_error_codes, r=jdonszelmann
Hard code the error code registry for custom drivers

And do some cleanups enabled by this.
2026-02-06 10:06:45 +01:00
Jonathan Brouwer
ce706cd4ef
Rollup merge of #152136 - eggyal:consolidate-type-const-checks, r=BoxyUwU
Consolidate type const checks on `tcx.is_type_const`

A little bit of cleanup; explanation can be found in the reporting issue.

Fixes rust-lang/rust#152124
r? BoxyUwU
2026-02-06 10:06:44 +01:00
Jonathan Brouwer
771fa578bf
Rollup merge of #152117 - JonathanBrouwer:convert_trait_selection2, r=GuillaumeGomez
Convert to inline diagnostics in `rustc_trait_selection`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-06 10:06:43 +01:00
Jonathan Brouwer
65a1d9708d
Rollup merge of #152107 - JonathanBrouwer:convert_borrowck, r=lqd
Convert to inline diagnostics in `rustc_borrowck`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-06 10:06:43 +01:00
Jonathan Brouwer
3fb526578e
Rollup merge of #151474 - nnethercote:circ-deps, r=davidtwco
Minor structural improvements

Some small cleanups.

r? @davidtwco
2026-02-06 10:06:42 +01:00
Jonathan Brouwer
ee753e8113
Rollup merge of #149329 - Jarcho:for_question_ctxt, r=davidtwco
Mark match arms in try and for as being from desugarings.

Some of the arms created by these desugarings have an expression which isn't marked as coming from the desugaring. e.g. try generates `Continue(val) => val` where the expression has the span of the original parameter (done for diagnostic purposes). Since the arm created just used that span they end up without a desugaring mark unnecessarily.

This is only a minor annoyance with some work I'm doing in clippy.
2026-02-06 10:06:41 +01:00
Jonathan Brouwer
de0e4bd0cc
Rollup merge of #152191 - JonathanBrouwer:convert_hir_analysis, r=jdonszelmann
Convert to inline diagnostics in `rustc_hir_analysis`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-06 10:06:41 +01:00
Jonathan Brouwer
57aae94bed
Convert to inline diagnostics in rustc_hir_analysis 2026-02-06 10:05:35 +01:00
bors
cf16cd9b75 Auto merge of #152086 - nnethercote:stable-hashing-cleanups, r=cjgillot
Stable hashing cleanups

I took a close look at `rustc_query_system::ich` and found a bunch of things to improve.

r? @cjgillot
2026-02-06 06:02:23 +00:00
Yuri Astrakhan
dc87b28bdb
Improve error message for non-descriptive test names 2026-02-05 22:57:11 -05:00
Yuri Astrakhan
62d0533eae
Update error message for non-descriptive test files 2026-02-05 22:24:22 -05:00
Yuri Astrakhan
1dfdfe8149 chore: clearify tidy's error message 2026-02-05 22:01:40 -05:00
bors
a3ceeeb26c Auto merge of #152200 - jieyouxu:rollup-UNFpgZy, r=jieyouxu
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#152174 (stdarch subtree update)
 - rust-lang/rust#151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - rust-lang/rust#151955 (escape symbol names in global asm)
 - rust-lang/rust#152194 (Remove the 4 failing tests from rustdoc-gui)

Failed merges:

 - rust-lang/rust#152191 (Convert to inline diagnostics in `rustc_hir_analysis`)
2026-02-06 02:28:08 +00:00
许杰友 Jieyou Xu (Joe)
7afff45d57
Rollup merge of #152194 - JonathanBrouwer:fix-rustdoc-gui, r=jieyouxu
Remove the 4 failing tests from rustdoc-gui

These are the 4 tests that @Bryntet got to fail locally
See [#t-infra > CI failure because `tests/rustdoc-gui/search-filter.goml`](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20failure.20because.20.60tests.2Frustdoc-gui.2Fsearch-filter.2Egoml.60/with/572271674)

r? @ghost
2026-02-06 10:25:44 +08:00
许杰友 Jieyou Xu (Joe)
4a1e87c598
Rollup merge of #151955 - usamoi:escape, r=davidtwco
escape symbol names in global asm

copied from https://github.com/llvm/llvm-project/blob/main/llvm/lib/MC/MCSymbol.cpp

closes https://github.com/rust-lang/rust/issues/151950
2026-02-06 10:25:44 +08:00
许杰友 Jieyou Xu (Joe)
7b821d1752
Rollup merge of #151278 - estebank:issue-108894, r=davidtwco
Provide more context on trait bounds being unmet due to imperfect derive

When encountering a value that has a borrow checker error where the type was previously moved, when suggesting cloning verify that it is not already being derived. If it is, explain why the `derive(Clone)` doesn't apply:

```
note: if `TypedAddress<T>` implemented `Clone`, you could clone the value
  --> $DIR/derive-clone-implicit-bound.rs:6:1
   |
LL | #[derive(Clone, Copy)]
   |          ----- derived `Clone` adds implicit bounds on type parameters
LL | pub struct TypedAddress<T>{
   | ^^^^^^^^^^^^^^^^^^^^^^^^-^
   | |                       |
   | |                       introduces an implicit `T: Clone` bound
   | consider manually implementing `Clone` for this type
...
LL |         let old = self.return_value(offset);
   |                                     ------ you could clone this value
```

When encountering a bound coming from a derive macro, suggest manual impl of the trait.

Use the span for the specific param when adding bounds in builtin derive macros, so the diagnostic will point at them as well as the derive macro itself.

```
note: required for `Id<SomeNode>` to implement `PartialEq`
  --> $DIR/derive-implicit-bound.rs:5:10
   |
LL | #[derive(PartialEq, Eq)]
   |          ^^^^^^^^^
LL | pub struct Id<T>(PhantomData<T>);
   |               - unsatisfied trait bound introduced in this `derive` macro
   = help: consider manually implementing `PartialEq` to avoid undesired bounds
```

Mention that the trait could be manually implemented in E0599.

Fix rust-lang/rust#108894. Address rust-lang/rust#143714. Address #rust-lang/rust#146515 (but ideally would also suggest constraining the fn bound correctly as well).
2026-02-06 10:25:43 +08:00
许杰友 Jieyou Xu (Joe)
de68f27bc1
Rollup merge of #152174 - folkertdev:stdarch-sync-2026-02-05, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 1a7cc47efc.

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

r? @ghost
2026-02-06 10:25:42 +08:00
Manuel Drehwald
5d42732335 update openmp/offload builds to LLVM 22 2026-02-05 17:52:52 -08:00
Jonathan Brouwer
bce8c00e2f
Remove the 4 failing tests from rustdoc-gui 2026-02-06 01:13:41 +01:00
Nicholas Nethercote
e35fd451a0 Add a useful comment about the RawList stable hash cache.
I tried removing it to see what happened. Not a good idea!
2026-02-06 09:18:19 +11:00
Nicholas Nethercote
09eb497396 Remove Resolver::create_stable_hashing_context.
It only has two uses. We can instead use `with_stable_hashing_context`,
which has more than 30 uses.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
93a1a8064d Move some impls.
`HashStableContext` impls should be in `hcx.rs`, and `HashStable` impls
should be in `impls_syntax.rs`. This commit moves a few that are in the
wrong file.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
f729340aab Inline and remove two StableHashingContext methods.
They both have a single use.

Also adjust a couple of visibilities.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
99b9f51725 Merge two fields in StableHashingContext.
The new type makes the behaviour clearer: we start with the cache in an
"unused" form and then instantiate it once it is actually used.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
7298e17366 Remove rustc_hir::HashStableContext::hash_attr_id.
It has a single impl, which does nothing, as you'd expect when hashing a
type called `HashIgnoredAttrId`!

So this commit just removes it, and `HashIgnoredAttrId::hash_stable`
ends up doing nothing (with a comment) instead of calling the trait
method to do nothing.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
e2edce0221 Remove rustc_span::HashStableContext::hash_spans.
It reads the `HashingControls::span` field, but there is also the
`hashing_controls` method. No need to have two different ways of doing
it.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
cd3c9329fb Fix control flow in assert_default_hashing_controls.
Calling `match` on a struct is a really weird thing to do. As the name
suggests, it's an assert, so let's write it as one. Also clarify the
comment a little.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
c9f827754a Make HashingControls impl Copy.
It has a single `bool` field.
2026-02-06 09:18:18 +11:00
Nicholas Nethercote
c32c48114a Improve is_ignored_attr.
It has a single use. It doesn't need to be public. It doesn't use `self`
and so doesn't need to be in the trait. And `IGNORED_ATTRIBUTES` can be
moved within it.
2026-02-06 09:18:16 +11:00
Oscar Bray
a2f9dec29c Parse #[rustc_abi(..)] 2026-02-05 19:07:50 +00:00
apiraino
623c9cd143
update compiler stable backport zulip msg 2026-02-05 18:24:30 +01:00
Jonathan Brouwer
55d1ba12d9
Convert to inline diagnostics in rustc_trait_selection 2026-02-05 16:58:59 +01:00
Jonathan Brouwer
6782a190f2
Register functions in translation 2026-02-05 16:58:48 +01:00
Jonathan Brouwer
dd61998e74
Convert to inline diagnostics in rustc_borrowck 2026-02-05 16:55:55 +01:00
bors
f889772d65 Auto merge of #152096 - bjorn3:mir_encoding_cleanups, r=oli-obk
Couple of cleanups and optimizations around MIR encoding
2026-02-05 15:30:48 +00:00
Jana Dönszelmann
911203936b
Port rustc_effective_visibility to the new attribute parser 2026-02-05 15:33:23 +01:00
Folkert de Vries
3cf999fb53
Merge pull request #2022 from fneddy/s390x_softfloat_abi
disable s390x vector intrinsics if softfloat is enabled
2026-02-05 14:16:32 +00:00
Eddy (Eduard) Stefes
edeb02f382 disable s390x vector intrinsics if softfloat is enabled
we will add an explicit incompatibility of softfloat and vector feature
in rutsc s390x-unknown-none-softfloat target specification.
Therefore we need to disable vector intrinsics here to be able to compile
core for this target.
2026-02-05 13:36:18 +01:00
bors
66daca1a85 Auto merge of #152163 - JonathanBrouwer:rollup-Ypg7w4H, r=JonathanBrouwer
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#150831 (c-variadic: make `va_arg` match on `Arch` exhaustive)
 - rust-lang/rust#152113 (Fix GitHub CI summary in CodeBuild)
 - rust-lang/rust#152153 (Incorporate query description functions into `QueryVTable`)
 - rust-lang/rust#152070 (Convert to inline diagnostics in `rustc_pattern_analysis`)
 - rust-lang/rust#152106 (Convert to inline diagnostics in `rustc_ast_passes`)
 - rust-lang/rust#152109 (Convert to inline diagnostics in `rustc_errors`)
 - rust-lang/rust#152119 (Convert to inline diagnostics in `rustc_middle`)
 - rust-lang/rust#152121 (Convert to inline diagnostics in `rustc_builtin_macros`)
 - rust-lang/rust#152133 (library/std: Rename `ON_BROKEN_PIPE_FLAG_USED` to `ON_BROKEN_PIPE_USED`)

Failed merges:

 - rust-lang/rust#152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - rust-lang/rust#152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - rust-lang/rust#152126 (Convert to inline diagnostics in `rustc_mir_build`)
 - rust-lang/rust#152131 (Port rustc_no_implicit_bounds attribute to parser.)
2026-02-05 12:10:17 +00:00
Jonathan Brouwer
cb77fcb3a6
Rollup merge of #152133 - Enselic:on-broken-pipe-flag-rename, r=ChrisDenton
library/std: Rename `ON_BROKEN_PIPE_FLAG_USED` to `ON_BROKEN_PIPE_USED`

This commit is a pure internal rename and does not change any functionality.

The `FLAG_` part of `ON_BROKEN_PIPE_FLAG_USED` comes from that the compiler flag `-Zon-broken-pipe=...` is used to enable the feature.

Remove the `FLAG_` part so the name works both for the current compiler flag `-Zon-broken-pipe=...` and for the upcoming [Externally Implementable Item `#[std::io::on_broken_pipe]`](https://github.com/rust-lang/rust/pull/150591) PR. This makes the diff of that PR smaller.

The local variable name `sigpipe_attr_specified` comes from way back when the feature was controlled with an `fn main()` attribute called `#[unix_sigpipe = "..."]`. Rename that too.
2026-02-05 12:17:03 +01:00
Jonathan Brouwer
3c61714cc3
Rollup merge of #152121 - JonathanBrouwer:convert_builtin_macros, r=lqd
Convert to inline diagnostics in `rustc_builtin_macros`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-05 12:17:01 +01:00
Jonathan Brouwer
4d535f5642
Rollup merge of #152119 - JonathanBrouwer:convert_middle, r=jdonszelmann
Convert to inline diagnostics in `rustc_middle`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-05 12:17:01 +01:00