Commit graph

318684 commits

Author SHA1 Message Date
The Miri Cronjob Bot
d888b1c108 Prepare for merging from rust-lang/rust
This updates the rust-version file to 7bee525095.
2026-02-15 05:18:09 +00:00
reddevilmidzy
c92f384eb1 Move meta tests to compiletest-self-test, bootstrap dir 2026-02-15 04:43:02 +00:00
reddevilmidzy
86f1affe5a Move higher-ranked-trait-bounds tests into higher-ranked subdir 2026-02-15 04:39:21 +00:00
reddevilmidzy
863caf8b6b Move btreemap, hashmap tests into collections subdir 2026-02-15 04:39:13 +00:00
reddevilmidzy
1612988310 Move underscore-imports tests into imports subdir 2026-02-15 04:38:55 +00:00
reddevilmidzy
abca0d5f74 Move dynamically-sized-types tests into dst dir 2026-02-15 04:38:12 +00:00
Jacob Pratt
12755aa52c
Rollup merge of #152610 - Shunpoco:fix-js-lint-bless-message, r=clubby789
Exchange js_lint message between bless and non-bless

The message `applying suggestions` should be emitted when bless is enabled.
2026-02-14 23:17:41 -05:00
Jacob Pratt
5d2a033b85
Rollup merge of #152472 - lizan:wasm, r=Mark-Simulacrum
unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block

This fix rust-std compile error on wasm32-unknown-unknown with panic=unwind because of `#![deny(unsafe_op_in_unsafe_fn)]`
2026-02-14 23:17:41 -05:00
Jacob Pratt
9369cfff04
Rollup merge of #152402 - AprilNEA:test/issue-141738-struct-ctor-array-len, r=BoxyUwU
Add regression test for #141738

Closes rust-lang/rust#141738

- Add a regression test for rust-lang/rust#141738
- Using a struct constructor (`DefKind::Ctor(Struct, Const)`) as an array repeat count with `#![feature(min_generic_const_args)]` used to ICE in const alias normalization
- Fixed by rust-lang/rust#150704, which added const constructor support for mGCA. This test covers the **error path** (struct ctor where `usize` is expected), which was not covered by the tests in rust-lang/rust#150704
2026-02-14 23:17:40 -05:00
Jacob Pratt
ef776c603c
Rollup merge of #152188 - cuviper:placeholder-stdarch, r=Mark-Simulacrum
Include `library/stdarch` for `CURRENT_RUSTC_VERSION` updates

Our tool `replace-version-placeholder` uses the `tidy` file walker and its
directory filter, but that skips `library/stdarch` which we do need for public
stability markers. This PR adds a local filter function that explicitly allows
that path.

The commit for 1.94 `stdarch` updates is coming from beta rust-lang/rust#152187.
2026-02-14 23:17:40 -05:00
Jacob Pratt
9f0b29be99
Rollup merge of #152578 - heiher:ci-crosstool, r=Mark-Simulacrum
ci: Lock cross toolchain version and update docs

This PR locks the cross-toolchain component version to avoid unexpected changes when bumping crosstool-ng, and updates the toolchain configuration in the docs to match the actual setup.

try-job: dist-arm-linux-musl
try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
try-job: dist-powerpc64-linux-musl
try-job: dist-powerpc64le-linux-gnu
try-job: dist-powerpc64le-linux-musl
2026-02-14 23:17:39 -05:00
Jacob Pratt
3ce7fb6607
Rollup merge of #152534 - PaulDance:patches/remove-win7-uds, r=Mark-Simulacrum
Test(lib/win/net): Skip UDS tests when under Win7

Unix Domain Socket support has only been added to Windows since Windows 10 Insider Preview Build 17063. Thus, it has no chance of ever being supported under Windows 7, making current tests fail. This therefore adds the necessary in order to make the tests dynamically skip when run under Windows 7, 8, and early 10, as it does not trigger linker errors.

cc rust-lang/rust#150487 @roblabla

@rustbot label T-libs A-io O-windows-7
2026-02-14 23:17:32 -05:00
Jacob Pratt
8075b89aa6
Rollup merge of #152508 - arferreira:improve-write-macro-diagnostic, r=Mark-Simulacrum
Improve write! and writeln! error when called without destination

Fixes rust-lang/rust#152493

Adds catch-all arms to `write!` and `writeln!` macros so that calling them without a destination (e.g., `write!("S")` instead of `write!(f, "S")`) gives a clear error instead of the cryptic "unexpected end of macro invocation" pointing at macro internals.

r? @estebank
2026-02-14 23:17:31 -05:00
Jacob Pratt
f065c9dab1
Rollup merge of #152132 - folkertdev:carryless-mul, r=Mark-Simulacrum
implement `carryless_mul`

tracking issue: https://github.com/rust-lang/rust/issues/152080
ACP: https://github.com/rust-lang/libs-team/issues/738

This defers to LLVM's `llvm.clmul` when available, and otherwise falls back to a method from the `polyval` crate ([link](https://github.com/RustCrypto/universal-hashes/blob/master/polyval/src/field_element/soft/soft64.rs)).

Some things are missing, which I think we can defer:

- the ACP has some discussion about additional methods, but I'm not sure exactly what is wanted or how to implement it efficiently
- the SIMD intrinsic is not yet `const` (I think I ran into a bootstrapping issue). That is fine for now, I think in `stdarch` we can't really use this intrinsic at the moment, we'd only want the scalar version to replace some riscv intrinsics.
- the SIMD intrinsic is not implemented for the gcc and cranelift backends. That should be reasonably straightforward once we have a const eval implementation though.
2026-02-14 23:17:31 -05:00
Jacob Pratt
79adcd1375
Rollup merge of #150424 - xonx4l:suggest_param_env_shadowing, r=lcnr
diagnostics: add note when param-env shadows global impl

 This PR adds a diagnostics note when param-env shadows global impl as discussed in https://github.com/rust-lang/rust/issues/149910

It adds a note explaining that the definition is hidden by the generic bound.

r?lcnr
2026-02-14 23:17:30 -05:00
bors
75b9d89c68 Auto merge of #151380 - ShoyuVanilla:shallow-resolve-to-root-var, r=lcnr
Shallow resolve ty and const vars to their root vars

Continuation of https://github.com/rust-lang/rust/pull/147193
2026-02-15 03:04:28 +00:00
Nicholas Nethercote
fcea886c1a Break up DepsType.
By moving most of it into `DepKind`, and changing two methods into free
functions.
2026-02-15 13:07:41 +11:00
Nicholas Nethercote
7c877d994b Remove DepContext.
It's no longer needed now that we can access `TyCtxt` directly.
2026-02-15 13:07:40 +11:00
Nicholas Nethercote
414be2e6ff Remove Deps.
It's no longer needed.
2026-02-15 13:07:39 +11:00
Nicholas Nethercote
1d83208683 De-genericize the dep graph.
By removing the generic `D` parameter from `DepGraph`, `DepGraphData`,
`CurrentDepGraph`, `SerializedDepGraph`, `SerializedNodeHeader`, and
`EncoderState`.
2026-02-15 13:07:37 +11:00
Nicholas Nethercote
32e6a1a0ab Remove QueryContext.
`rustc_query_system` has been reduced so much that it's no longer
needed. This avoids a lot of indirection and abstraction.
2026-02-15 13:07:35 +11:00
Alex Macleod
54875f6835 Provide all lint group names to Clippy
Unblocks https://github.com/rust-lang/rust-clippy/pull/14689
2026-02-15 00:32:37 +00:00
Ben Kimock
e542472c92
Merge pull request #4858 from saethlin/typos-redux
src/concurrency/weak_memory.rs made -> marked
2026-02-15 00:10:27 +00:00
bors
7bee525095 Auto merge of #152632 - JonathanBrouwer:rollup-hVWecYA, r=JonathanBrouwer
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#152622 (Update GCC subtree)
 - rust-lang/rust#145024 (Optimize indexing slices and strs with inclusive ranges)
 - rust-lang/rust#151365 (UnsafePinned: implement opsem effects of UnsafeUnpin)
 - rust-lang/rust#152381 (Do not require `'static` for obtaining reflection information.)
 - rust-lang/rust#143575 (Remove named lifetimes in some `PartialOrd` & `PartialEq` `impl`s)
 - rust-lang/rust#152404 (tests: adapt align-offset.rs for InstCombine improvements in LLVM 23)
 - rust-lang/rust#152582 (rustc_query_impl: Use `ControlFlow` in `visit_waiters` instead of nested options)
2026-02-14 23:32:04 +00:00
Ben Kimock
1c21e60964 made -> marked 2026-02-14 17:54:44 -05:00
Albab-Hasan
646418838f fix: handle ref mut bindings in contains_explicit_ref_binding
the standalone `contains_explicit_ref_binding` function only checked for
`BindingAnnotation::Ref`, missing `BindingAnnotation::RefMut`. this caused
`let ref mut x = expr` to incorrectly take the coercion path instead of
preserving the exact type of the rhs expression. the method version used
for match arms already handles both `Ref` and `RefMut` correctly.
2026-02-15 04:21:34 +06:00
Folkert de Vries
f5bf3353e6
move va_list operations into InterpCx 2026-02-14 22:55:26 +01:00
xonx
1be41648d4 move and add comment 2026-02-14 21:32:57 +00:00
Folkert de Vries
ca3d1a3211
add c-variadic miri test 2026-02-14 22:27:41 +01:00
Folkert de Vries
02c4af397e
c-variadic functions in rustc_const_eval 2026-02-14 22:27:39 +01:00
Folkert de Vries
ce693807f6
make Va::arg and VaList::drop const fns 2026-02-14 22:26:24 +01:00
Folkert de Vries
a7888c1342
allow const fn to be c-variadic
however `Drop` for `VaList` is not yet available in const fn
2026-02-14 22:26:23 +01:00
Jonathan Brouwer
7c36d152b4
Rollup merge of #152582 - petrochenkov:waitvisit, r=TaKO8Ki
rustc_query_impl: Use `ControlFlow` in `visit_waiters` instead of nested options

Noticed when reviewing https://github.com/rust-lang/rust/pull/152229.
2026-02-14 22:11:55 +01:00
Jonathan Brouwer
e6ca590153
Rollup merge of #152404 - durin42:llvm-23-instcombine-shrink-constant, r=Mark-Simulacrum
tests: adapt align-offset.rs for InstCombine improvements in LLVM 23

Upstream [has improved InstCombine](8d2078332c) so that it can shrink added constants using known zeroes, which caused a little bit of change in this test. As far as I can tell either output is fine, so we just accept both.

@rustbot label: +llvm-main
2026-02-14 22:11:54 +01:00
Jonathan Brouwer
96066cb5b5
Rollup merge of #143575 - GrigorenkoPV:unused_lifetimes, r=Mark-Simulacrum
Remove named lifetimes in some `PartialOrd` & `PartialEq` `impl`s

Makes [the docs](https://doc.rust-lang.org/1.88.0/std/cmp/trait.PartialOrd.html#impl-PartialOrd%3CPathBuf%3E-for-Cow%3C'a,+Path%3E) way easier to look at, gets rid of a few `#[allow(unused_lifetimes)]`, and AFAICT is completely equivalent.
2026-02-14 22:11:54 +01:00
Jonathan Brouwer
16da3ab2ea
Rollup merge of #152381 - oli-obk:non_static_reflection, r=Mark-Simulacrum
Do not require `'static` for obtaining reflection information.

tracking issue rust-lang/rust#142577

This does not affect the stable `TypeId::of`, as that has its own `'static` bound.

But it will allow obtaining `TypeId`s for non-static types via the reflection API. To obtain such a `TypeId` for any type, just use `Type::of::<(T,)>().kind` to extract the first field of a tuple.

This effectively reintroduces rust-lang/rust#41875, which @rust-lang/lang decided against allowing back in 2018 due to lack of sound use cases. We will thus need to have a T-lang meeting specifically about `TypeId` for non-static types before *stabilizing* any part of reflection (in addition to T-lang meetings about reflection in general). I'm adding an explicit point about this to the tracking issue.

cc @scottmcm @joshtriplett @9SonSteroids @SpriteOvO @izagawd @BD103
2026-02-14 22:11:53 +01:00
Jonathan Brouwer
33c2a6eba9
Rollup merge of #151365 - RalfJung:unsafe-unpin-opsem, r=BoxyUwU
UnsafePinned: implement opsem effects of UnsafeUnpin

This implements the next step for https://github.com/rust-lang/rust/issues/125735: actually making `UnsafePinned` have special opsem effects by suppressing the `noalias` *even if* the type is wrapped in an `Unpin` wrapper.

For backwards compatibility we also still keep the `Unpin` hack, i.e. a type must be both `Unpin` and `UnsafeUnpin` to get `noalias`.
2026-02-14 22:11:53 +01:00
Jonathan Brouwer
6d625cc074
Rollup merge of #145024 - Kmeakin:km/optimize-slice-index/v3, r=Mark-Simulacrum
Optimize indexing slices and strs with inclusive ranges

Instead of separately checking for `end == usize::MAX` and `end + 1 > slice.len()`, we can check for `end >= slice.len()`. Also consolidate all the str indexing related panic functions into a single function which reports the correct error depending on the arguments, as the slice indexing code already does.

The downside of all this is that the panic message is slightly less specific when trying to index with `[..=usize::MAX]`: instead of saying "attempted to index str up to maximum usize" it just says "end byte index {end} out of bounds". But this is a rare enough case that I think it is acceptable
2026-02-14 22:11:52 +01:00
Jonathan Brouwer
0318407e30
Rollup merge of #152622 - GuillaumeGomez:subtree-update_cg_gcc_2026-02-14, r=GuillaumeGomez
Update GCC subtree

cc @antoyo
r? ghost
2026-02-14 22:11:52 +01:00
Folkert de Vries
b935f379b4
implement carryless_mul 2026-02-14 21:23:30 +01:00
Alexander Kjäll
d15d7149b1
fix smol_str compilation error
the command 'cargo build --no-default-features --features borsh' failed with:
error[E0599]: no function or associated item named 'other' found for struct 'borsh::io::Error' in the current scope
   --> lib/smol_str/src/borsh.rs:33:39
    |
 33 |                 .ok_or_else(|| Error::other("u8::vec_from_reader unexpectedly returned None"))?;
    |                                       ^^^^^ function or associated item not found in 'borsh::io::Error'
    |
2026-02-14 21:06:34 +01:00
AprilNEA
8d96e26684
Add regression test for struct ctor used as array repeat count under mGCA
Using a struct constructor (DefKind::Ctor(Struct, Const)) as an array
repeat count with `#![feature(min_generic_const_args)]` used to trigger
an ICE in const alias normalization. Add a regression test to ensure
the compiler produces a proper type error instead of panicking.
2026-02-14 19:44:50 +00:00
Ben Kimock
0b1003c20d
Merge pull request #4850 from hsqStephenZhang/chore/typos
chore: fix typos suggested by typos-cli
2026-02-14 18:30:01 +00:00
bors
a33907a7a5 Auto merge of #152627 - JonathanBrouwer:rollup-wjHXhK0, r=JonathanBrouwer
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#152618 (stdarch subtree update)
 - rust-lang/rust#152001 (mGCA: Validate const literal against expected type)
 - rust-lang/rust#152120 (Don't ICE on layout error in vtable computation)
 - rust-lang/rust#152531 (`proc_macro::bridge`: simplify `ExecutionStrategy` and `DispatcherTrait`)
 - rust-lang/rust#152577 (Port #[rustc_proc_macro_decls] to the new attribute parser.)
 - rust-lang/rust#152570 (Port #[rustc_test_marker] to the attribute parser)
 - rust-lang/rust#152590 (DepGraphQuery: correctly skip adding edges with not-yet-added nodes)
 - rust-lang/rust#152612 (Rename `inline_fluent!` to `msg!`)
2026-02-14 17:56:54 +00:00
Jonathan Brouwer
38cc50b6e4
Rollup merge of #152612 - JonathanBrouwer:rename_to_msg, r=jdonszelmann
Rename `inline_fluent!` to `msg!`

This was the most popular name for the macro as voted in [#t-compiler > Bikeshed the new &#96;inline_fluent!&#96; macro @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Bikeshed.20the.20new.20.60inline_fluent!.60.20macro/near/572751863)
2026-02-14 18:55:38 +01:00
Jonathan Brouwer
3f3c6fda3d
Rollup merge of #152590 - petrochenkov:skipedge, r=mati865
DepGraphQuery: correctly skip adding edges with not-yet-added nodes

Fixes https://github.com/rust-lang/rust/issues/142152.

The current logic already skips some edges, so I'm not sure how critical it is to have *all* the edges recorded, the logic seems to only be used for debug dumping.
Recording all edges requires supporting holes in the `LinkedGraph` data structure, to add nodes and edges out of order, https://github.com/rust-lang/rust/pull/151821 implements that at cost of complicating the data structure.
2026-02-14 18:55:38 +01:00
Jonathan Brouwer
923fb76303
Rollup merge of #152570 - Ozzy1423:attr-parse, r=JonathanBrouwer
Port #[rustc_test_marker] to the attribute parser

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

Targets:
Const is for normal tests (const test::TestDescAndFn is inserted before the test fn)
Const/Static/Fn is for custom_test_framework's #[test_case] e.g. tests/ui/custom_test_frameworks/full.rs

r? @JonathanBrouwer

Again I left the use-sites as is since they are early uses.
2026-02-14 18:55:37 +01:00
Jonathan Brouwer
cf0cb74612
Rollup merge of #152577 - Ozzy1423:macro-attr, r=JonathanBrouwer
Port #[rustc_proc_macro_decls] to the new attribute parser.

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

r? @JonathanBrouwer
2026-02-14 18:55:36 +01:00
Jonathan Brouwer
8a03b5f3ec
Rollup merge of #152531 - cyrgani:pm-yet-another-cleanup, r=petrochenkov
`proc_macro::bridge`: simplify `ExecutionStrategy` and `DispatcherTrait`

Also includes another tiny cleanup (functions can only have one return type).
2026-02-14 18:55:36 +01:00
Jonathan Brouwer
2c4656ac66
Rollup merge of #152120 - meithecatte:push-ltvwvkqrytno, r=petrochenkov
Don't ICE on layout error in vtable computation

Fixes rust-lang/rust#152030.

Note: I'm including a more general testcase that doesn't use the feature in the original report, but only reproduces with debuginfo disabled. Does it make sense to also include the original testcase?
2026-02-14 18:55:36 +01:00