Commit graph

315820 commits

Author SHA1 Message Date
bors
d940e56841 Auto merge of #151363 - JonathanBrouwer:rollup-yIXELnN, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#151336 (Port rustc codegen attrs)
 - rust-lang/rust#151359 (compiler: Temporarily re-export `assert_matches!` to reduce stabilization churn)

r? @ghost
2026-01-19 13:09:33 +00:00
Jonathan Brouwer
4004dd1b15
Rollup merge of #151359 - assert-matches, r=BoxyUwU,Noratrieb
compiler: Temporarily re-export `assert_matches!` to reduce stabilization churn

https://github.com/rust-lang/rust/pull/137487 proposes to stabilize `feature(assert_matches)`, while simultaneously moving the `assert_matches!` and `debug_assert_matches!` macros out of the `std::assert_matches` submodule and exporting them directly from the `std` crate root instead.

Unfortunately, that moving step would cause a lot of `cfg(bootstrap)` churn and noise in the compiler, because the compiler imports and uses those macros in dozens of places.

This PR therefore aims to reduce the overall compiler churn, by temporarily adjusting the compiler to always use `assert_matches!` via a re-export from `rustc_data_structures`. That way, the stabilization itself would only need to add `cfg(bootstrap)` to that single re-export (plus the associated `#![feature(assert_matches)]` attributes), greatly reducing the immediate impact on the compiler.

Once `assert_matches!` is stable in the stage0 bootstrap compiler, we can go back and delete the re-export, and adjust the rest of the compiler to import directly from `std` instead.
2026-01-19 12:33:42 +01:00
Jonathan Brouwer
a77d6b838a
Rollup merge of #151336 - port_rustc_codegen_attrs, r=JonathanBrouwer
Port rustc codegen attrs

Tracking issue: rust-lang/rust#131229

two more quick ones

r? @JonathanBrouwer
2026-01-19 12:33:42 +01:00
Edvin Bryntesson
3e731f7e84
Port #[rustc_offload_kernel] to attr parser 2026-01-19 10:40:42 +01:00
Edvin Bryntesson
03b8b68073
Port #[rustc_nounwind] to attr parser 2026-01-19 10:40:41 +01:00
bors
158ae9ee50 Auto merge of #151360 - JonathanBrouwer:rollup-UpAM1gc, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151071 (Generate openmp metadata)
 - rust-lang/rust#151302 (add lint test)
 - rust-lang/rust#151338 (Factor out diagnostic slug checking from `DiagnosticDerive` )
 - rust-lang/rust#151354 (ci: Move lockfile updates to a script)

r? @ghost
2026-01-19 09:40:32 +00:00
Jonathan Brouwer
20262a2637
Rollup merge of #151354 - weekly-update-script, r=jieyouxu
ci: Move lockfile updates to a script

This makes manual tweaking a little easier when there are issues.
2026-01-19 08:31:33 +01:00
Jonathan Brouwer
d2375c2edf
Rollup merge of #151338 - factor_slug, r=Kivooeo
Factor out diagnostic slug checking from `DiagnosticDerive`

Doing some cleanup work in preparation for https://github.com/rust-lang/compiler-team/issues/959

r? @Kivooeo
2026-01-19 08:31:32 +01:00
Jonathan Brouwer
3f01ca0f54
Rollup merge of #151302 - add-lint-test, r=lqd
add lint test

closes rust-lang/rust#138069, which was already fixed.
2026-01-19 08:31:32 +01:00
Jonathan Brouwer
a56e2d3037
Rollup merge of #151071 - gen-openmp-metadata, r=nnethercote
Generate openmp metadata

LLVM has an openmp-opt pass, which is part of the default O3 pipeline.
The pass bails if we don't have a global called openmp, so let's generate it if people enable our experimental offload feature. openmp is a superset of the offload feature, so they share optimizations.
In follow-up PRs I'll start verifying that LLVM optimizes Rust the way we want it.

r? compiler
2026-01-19 08:31:31 +01:00
Zalathar
7ec34defe9 Temporarily re-export assert_matches! to reduce stabilization churn 2026-01-19 18:26:53 +11:00
bors
53b6f89be2 Auto merge of #151352 - Zalathar:rollup-nUIzD3P, r=Zalathar
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151080 (fix(build-manifest): enable docs target fallback for `rustc-docs`)
 - rust-lang/rust#151328 (Fix capitalization of diag messages)
 - rust-lang/rust#151341 (miri subtree update)
 - rust-lang/rust#151349 (Add myself to the review rotation)

r? @ghost
2026-01-19 06:22:30 +00:00
Jamie Hill-Daniel
0895c4cbe6 ci: Move lockfile updates to a script 2026-01-19 05:23:45 +00:00
Stuart Cook
1eb8961add
Rollup merge of #151349 - join-it, r=tiif
Add myself to the review rotation

I was mildly confused about why I never got randomly assigned PR and procrastinated on it 😆 It's time to do it.
2026-01-19 15:28:03 +11:00
Stuart Cook
20b39b812c
Rollup merge of #151341 - miri, r=RalfJung
miri subtree update

Subtree update of `miri` to 2d0a4f41fc.

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

r? @ghost
2026-01-19 15:28:02 +11:00
Stuart Cook
82db63b7ca
Rollup merge of #151328 - diag-case, r=Urgau
Fix capitalization of diag messages

Per https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-output-style-guide
> Error, Warning, Note, and Help messages start with a lowercase letter and do not end with punctuation.
2026-01-19 15:28:02 +11:00
Stuart Cook
c7e286492e
Rollup merge of #151080 - dist/rustc-docs-target-fallback, r=clubby789
fix(build-manifest): enable docs target fallback for `rustc-docs`
2026-01-19 15:28:01 +11:00
bors
3d087e6044 Auto merge of #150309 - dianqk:ssa-range, r=cjgillot
New MIR Pass: SsaRangePropagation

As an alternative to https://github.com/rust-lang/rust/pull/150192.

Introduces a new pass that propagates the known ranges of SSA locals.
We can know the ranges of SSA locals at some locations for the following code:
```rust
fn foo(a: u32) {
  let b = a < 9;
  if b {
    let c = b; // c is true since b is whitin the range [1, 2)
    let d = a < 8; // d is true since b whitin the range [0, 9)
  }
}
```

This PR only implements a trivial range: we know one value on switch, assert, and assume.
2026-01-19 03:04:55 +00:00
tiif
40691d0ca6 Add myself to the review rotation 2026-01-19 01:46:08 +00:00
KaiTomotake
3a8b57715f
add lint test
Co-authored-by: Redddy <midzy0228@gmail.com>
2026-01-19 08:59:44 +09:00
Jonathan Brouwer
f5a1fc75ad
Update uitests 2026-01-18 22:41:00 +01:00
Jonathan Brouwer
e668836c92
Fix capitalization of error messages 2026-01-18 22:40:55 +01:00
Jonathan Brouwer
7ec4a8e798
Update uitests 2026-01-18 22:36:39 +01:00
bors
9b37157ece Auto merge of #151339 - JonathanBrouwer:rollup-DYrRtnq, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#151287 (Reorganizing `tests/ui/issues` 15 tests [2/N] )
 - rust-lang/rust#151309 (fix: thread creation failed on the wasm32-wasip1-threads target.)
 - rust-lang/rust#151335 (Port rustc allocator attributes to attribute parser)

r? @ghost
2026-01-18 21:30:40 +00:00
Jonathan Brouwer
7216b035fa
Factor out diagnostic slug checking from DiagnosticDerive and LintDiagnosticDerive 2026-01-18 21:48:11 +01:00
Jonathan Brouwer
47d8a87c1e
Rollup merge of #151335 - port_allocator_attrs, r=JonathanBrouwer
Port rustc allocator attributes to attribute parser

Tracking issue: rust-lang/rust#131229

Made a new file since i saw this pattern for `rustc_dump.rs`

Very simple attributes so felt like I can do them all in one PR

r? @JonathanBrouwer
2026-01-18 21:43:45 +01:00
Jonathan Brouwer
3222939950
Rollup merge of #151309 - main, r=alexcrichton
fix: thread creation failed on the wasm32-wasip1-threads target.

wasm32-wasip1-threads target cannot create thread since nightly-2026-01-16.
This commit (c1bcae0638) broken it.
It in https://github.com/rust-lang/rust/pull/151016

This pull-request fix that issue.
2026-01-18 21:43:45 +01:00
Jonathan Brouwer
5a96067a65
Rollup merge of #151287 - m15t, r=Kivooeo
Reorganizing `tests/ui/issues` 15 tests [2/N]

part of https://github.com/rust-lang/rust/issues/133895

r? Kivooeo
2026-01-18 21:43:44 +01:00
Edvin Bryntesson
9a931e8bf2
Port #[rustc_allocator_zeroed_variant] to attr parser 2026-01-18 20:13:13 +01:00
Edvin Bryntesson
21c9bd7692
Port #[rustc_allocator_zeroed] to attr parser 2026-01-18 20:12:08 +01:00
Edvin Bryntesson
9a7614da04
Port #[rustc_reallocator] to attr parser 2026-01-18 20:10:35 +01:00
Edvin Bryntesson
027a6f268f
Port #[rustc_deallocator] to attr parser 2026-01-18 20:08:07 +01:00
Edvin Bryntesson
858fb40022
Port #[rustc_allocator] to attr parser 2026-01-18 20:06:15 +01:00
Ralf Jung
e582ac3d8f
Merge pull request #4813 from ChillFish8/avx512/add-pack-instructions
add avx512 `pack*` family of instructions to shims
2026-01-18 19:00:34 +00:00
Ralf Jung
41204bf780
Merge pull request #4800 from hulxv/refactor/simplify-libc-tests/libc-fs-symlink
Refactor `libc-fs-symlink` tests to use errno_result
2026-01-18 18:41:12 +00:00
chillfish8
43fb39f3fe
Add avx512 pack* family of instructions 2026-01-18 18:31:11 +00:00
bors
0a3cd3b6b6 Auto merge of #151325 - JonathanBrouwer:rollup-YoCcqTr, r=JonathanBrouwer
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#150767 (Allow invoking all help options at once)
 - rust-lang/rust#150886 (Added mGCA related tests)
 - rust-lang/rust#151245 (Explicitly list crate level attrs)
 - rust-lang/rust#151268 (Fix ICE on inconsistent import resolution with macro-attributed extern crate)
 - rust-lang/rust#151275 (Normalize type_const items even with feature `generic_const_exprs`)
 - rust-lang/rust#151288 (Use `find_attr` instead of `attr::contains_name` in `lower_const_item_rhs`)
 - rust-lang/rust#151321 (Port #![no_main] to the attribute parser.)

r? @ghost
2026-01-18 18:08:26 +00:00
Ralf Jung
bf8091e8e0
Merge pull request #4817 from RalfJung/missing-tests
shims: add FIXME for missing direct tests
2026-01-18 17:34:56 +00:00
Jonathan Brouwer
3c2c533d2e
Rollup merge of #151321 - no_main-attr, r=JonathanBrouwer
Port #![no_main] to the attribute parser.

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

r? @JonathanBrouwer
2026-01-18 18:26:06 +01:00
Jonathan Brouwer
4df80b1976
Rollup merge of #151288 - fix/151250, r=BoxyUwU
Use `find_attr` instead of `attr::contains_name` in `lower_const_item_rhs`

Fixes rust-lang/rust#151250

`attr::contains_name` uses `AttributeExt::name()` to filter, but for `hir::Attribute::Parsed`, this method will return `None`, and then `attr::contains_name` will return `false` here. So that the previous logic cannot work as expected.

r? @BoxyUwU
2026-01-18 18:26:06 +01:00
Jonathan Brouwer
9f49af87cb
Rollup merge of #151275 - fix/151251, r=BoxyUwU
Normalize type_const items even with feature `generic_const_exprs`

Fixes rust-lang/rust#151251

With feature `generic_const_exprs` enabled, consts with `#[type_const]` won't be normalized even if they need. Then ICE happens when CTFE tries to evaluate such const without body.

Fix this by normalizing such consts even with feature `generic_const_exprs` enabled.

r? @BoxyUwU
2026-01-18 18:26:06 +01:00
Jonathan Brouwer
85d2cf32f1
Rollup merge of #151268 - ice-inconsistent-resolution-151213, r=mati865
Fix ICE on inconsistent import resolution with macro-attributed extern crate

Fixes rust-lang/rust#151213 using issue_145575_hack_applied in the same way as in rust-lang/rust#149860.
2026-01-18 18:26:04 +01:00
Jonathan Brouwer
a5b6c4b0a0
Rollup merge of #151245 - list-crate-level, r=jdonszelmann
Explicitly list crate level attrs

r? @jdonszelmann
2026-01-18 18:26:04 +01:00
Jonathan Brouwer
57edde388b
Rollup merge of #150886 - mgca-test, r=BoxyUwU
Added mGCA related tests

Add regression tests for subsequent mGCA tasks

edit:

resolve: https://github.com/rust-lang/rust/issues/147415 `tests\ui\const-generics\mgca\size-of-generic-ptr-in-array-len.rs`
resolve: https://github.com/rust-lang/rust/issues/141014 `tests\ui\const-generics\mgca\assoc-const-projection-in-bound.rs`

and crashes: 138226, 138226-2, 149809, 150960
2026-01-18 18:26:03 +01:00
Jonathan Brouwer
05d494faaf
Rollup merge of #150767 - all-help, r=jieyouxu
Allow invoking all help options at once

Implements rust-lang/rust#150442

Help messages are printed in the order they are invoked, but only once (e.g. `--help -C help --help` prints regular help then codegen help).

Lint groups (`-Whelp`) are always printed last due to necessarily coming later in the compiler pipeline.

Adds `help` flags to `-C` and `-Z` to avoid an error in `build_session_options`.

cc @bjorn3 [#t-compiler/major changes > Allow combining &#96;--help -C help -Z help -… compiler-team#954 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Allow.20combining.20.60--help.20-C.20help.20-Z.20help.20-.E2.80.A6.20compiler-team.23954/near/564358190) - this currently maintains the behaviour of unrecognized options always failing-fast, as this happens within `getopt`s parsing, before we can even check if help options are present.
2026-01-18 18:26:03 +01:00
Ralf Jung
c367dfde69 shims: add FIXME for missing direct tests 2026-01-18 18:08:16 +01:00
Oscar Bray
ea77786cdb Port #![no_main] to the attribute parser. 2026-01-18 16:50:49 +00:00
Ralf Jung
255b483f2e
Merge pull request #4772 from hulxv/refactor/simplify-libc-tests/libc-epoll-blocking
Refactor epoll tests to use errno_result and improve notification checks
2026-01-18 14:59:05 +00:00
bors
2b112efccc Auto merge of #149484 - ogoffart:fix-68838, r=petrochenkov
Supress some lookup errors if a module contains `compile_error!`

The problem is that when a macro expand to `compile_error!` because its input is malformed, the actual error message from the `compile_error!` might be hidden in a long list of other messages about using items that should have otherwise been generated by the macro.

So suppress error about missing items in that module.

Fixes rust-lang/rust#68838
2026-01-18 14:50:15 +00:00
oligamiq
b35f80f7f7 fix: thread creation failed on the wasm32-wasip1-threads target. 2026-01-18 23:37:51 +09:00