Commit graph

312313 commits

Author SHA1 Message Date
Waffle Lapkin
93cd4f8a04
link funding page in .github/FUNDING.yml 2025-12-02 11:07:39 +01:00
bors
63b1db0580 Auto merge of #149531 - Zalathar:rollup-15y580s, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#145628 ([std][BTree] Fix behavior of `::append` to match documentation, `::insert`, and `::extend`)
 - rust-lang/rust#149241 (Fix armv4t- and armv5te- bare metal targets)
 - rust-lang/rust#149470 (compiletest: Prepare ignore/only conditions once in advance, without a macro)
 - rust-lang/rust#149507 (Mark windows-gnu* as lacking build with assertions)
 - rust-lang/rust#149508 (Prefer helper functions to identify MinGW targets)
 - rust-lang/rust#149516 (Stop adding MSYS2 to PATH)
 - rust-lang/rust#149525 (debuginfo/macro-stepping test: extend comments)
 - rust-lang/rust#149526 (Add myself (mati865) to the review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-02 04:23:39 +00:00
Stuart Cook
e168509186
Rollup merge of #149526 - mati865:mati865-review-rotation, r=Kivooeo
Add myself (mati865) to the review rotation

I've been procrastinating long enough.
2025-12-02 13:56:33 +11:00
Stuart Cook
cd6c17ea89
Rollup merge of #149525 - RalfJung:debuginfo-test-comments, r=jieyouxu
debuginfo/macro-stepping test: extend comments

Those `#locN` markers look like they are debuginfo compiletest magic (since `#break` is debuginfo compiletest magic). However, they are actually just magic strings used by the `check` commands in the test itself. This threw me off when I looked at the test (prompted by a CI failure), so let's leave a comment for the next poor soul that ends up lost in this test.

Also, for some reason the lldb instructions do not check for `#loc6`, unlike the gdb instructions. I do not know of an lldb version that actually makes the test pass (do we even run it with lldb at all on CI?), so I won't try to add a check for loc6, but let's at least add a comment to increase the chance that someone more knowledgeable about lldb and our test suite notices this in the future.
2025-12-02 13:56:32 +11:00
Stuart Cook
5afd8ff8df
Rollup merge of #149516 - mati865:no-msys2, r=jieyouxu
Stop adding MSYS2 to PATH

Rust no longer requires MSYS2 provided tools like make.
2025-12-02 13:56:32 +11:00
Stuart Cook
7cb02f9752
Rollup merge of #149508 - mati865:mingw-helpers, r=jieyouxu
Prefer helper functions to identify MinGW targets
2025-12-02 13:56:31 +11:00
Stuart Cook
7437db72a8
Rollup merge of #149507 - mati865:windows-gnu-like-no-asserts, r=clubby789
Mark windows-gnu* as lacking build with assertions

Knowing that `x86_64-pc-windows-gnu` has no builds with assertions, I have just copied it as `x86_64-pc-windows-gnullvm` and called a day. Obviously it should have been `false`, sorry for that.
While at it, also fix `x86_64-pc-windows-gnu`.
2025-12-02 13:56:31 +11:00
Stuart Cook
bbde1c0825
Rollup merge of #149470 - Zalathar:prepared-conditions, r=jieyouxu
compiletest: Prepare ignore/only conditions once in advance, without a macro

Compiletest has historically handled `ignore-*` and `only-*` directives in an extremely confusing way that makes the code hard to understand and hard to modify.

This PR therefore takes an important step away from that older design by instead evaluating a set of named boolean "conditions" in advance, and then using those conditions to help determine whether a particular directive should cause its test to be ignored or not.

As usual, there's more cleanup that I want to do here, but I've left most of it for future work to help keep this PR manageable.

r? jieyouxu
2025-12-02 13:56:30 +11:00
Stuart Cook
c539f3ffe1
Rollup merge of #149241 - thejpster:fix-armv4t-armv5te-bare-metal, r=davidtwco
Fix armv4t- and armv5te- bare metal targets

These two targets currently force on the LLVM feature `+atomics-32`. LLVM doesn't appear to actually be able to emit 32-bit load/store atomics for these targets despite this feature, and emits calls to a shim function called `__sync_lock_test_and_set_4`, which nothing in the Rust standard library supplies.

See [#t-compiler/arm > __sync_lock_test_and_set_4 on Armv5TE](https://rust-lang.zulipchat.com/#narrow/channel/242906-t-compiler.2Farm/topic/__sync_lock_test_and_set_4.20on.20Armv5TE/with/553724827) for more details.

Experimenting with clang and gcc (as logged in that zulip thread) shows that C code cannot do atomic load/stores on that architecture either (at least, not without a library call inserted).

So, the safest thing to do is probably turn off `+atomics-32` for these two Tier 3 targets.

I asked `@Lokathor` and he said he didn't even use atomics on the `armv4t-none-eabi`/`thumbv4t-none-eabi` target he maintains.

I was unable to reach `@QuinnPainter` for comment for `armv5te-none-eabi`/`thumbv5te-none-eabi`.

The second commit renames the base target spec `spec::base::thumb` to `spec::base::arm_none` and changes `armv4t-none-eabi`/`thumbv4t-none-eabi` and `armv5te-none-eabi`/`thumbv5te-none-eabi` to use it. This harmonises the frame-pointer and linker options across the bare-metal Arm EABI and EABIHF targets.

You could make an argument for harmonising `armv7a-none-*`, `armv7r-none*` and `armv8r-none-*` as well, but that can be another PR.
2025-12-02 13:56:30 +11:00
Stuart Cook
dbb92adfc1
Rollup merge of #145628 - tinnamchoi:fix-btree-append, r=Amanieu
[std][BTree] Fix behavior of `::append` to match documentation, `::insert`, and `::extend`

Resolves rust-lang/rust#145614
2025-12-02 13:56:29 +11:00
bors
4ad239f415 Auto merge of #142821 - cjgillot:jump-threading-single, r=saethlin
Compute jump threading opportunities in a single pass

The current implementation of jump threading walks MIR CFG backwards from each `SwitchInt` terminator. This PR replaces this by a single postorder traversal of MIR. In theory, we could do a full fixpoint dataflow analysis, but this has low returns as we forbid threading through a loop header.

The second commit in this PR modifies the carried state to a lighter data structure. The current implementation uses some kind of `IndexVec<ValueIndex, &[Condition]>`. This is needlessly heavy, as the state rarely ever carries more than a few `Condition`s. The first commit replaces this state with a simpler `&[Condition]`, and puts the corresponding `ValueIndex` inside `Condition`.

The three later commits are perf tweaks.

The sixth commit is the main change. Instead of carrying the goto target inside the condition, we maintain a set of conditions associated with each block, and their consequences in following blocks. Think: if this condition is fulfilled in this block, then that condition is fulfilled in that block. This makes the threading algorithm much easier to implement, without the extra bookkeeping of `ThreadingOpportunity` we had.

Later commits modify that algorithm to shrink the set of duplicated blocks. By propagating fulfilled conditions down the CFG, and trimming costly threads.
2025-12-01 23:44:49 +00:00
Mateusz Mikuła
5c282908be
Add myself (mati865) to the review rotation
I've been procrastinating long enough.
2025-12-01 22:46:13 +01:00
Ralf Jung
18af84b138 debuginfo/macro-stepping test: extend comments 2025-12-01 22:32:36 +01:00
bors
1d60f9e070 Auto merge of #149515 - matthiaskrgr:rollup-djmciuc, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#149393 (expand valid edition range for use-path-segment-kw.rs)
 - rust-lang/rust#149427 (Make the capitalization explicit on keyword misspell error)
 - rust-lang/rust#149433 (Use a delayed bug for this layout ICE)
 - rust-lang/rust#149473 (Tidying up UI tests [7/N])
 - rust-lang/rust#149505 (Update the comment in the add_typo_suggestion function)
 - rust-lang/rust#149513 (`rust-analyzer` subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-01 20:29:33 +00:00
Mateusz Mikuła
dc61415746 Prefer helper functions to identify MinGW targets 2025-12-01 19:12:00 +01:00
Mateusz Mikuła
662192a878 Stop adding MSYS2 to PATH
Rust no longer requires MSYS2 tools like make.
2025-12-01 18:37:33 +01:00
Matthias Krüger
c99912df44
Rollup merge of #149513 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to f25db5500b.

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

r? `@ghost`

Last one for now...
2025-12-01 18:35:13 +01:00
Matthias Krüger
453fca50ef
Rollup merge of #149505 - reddevilmidzy:fix, r=WaffleLapkin
Update the comment in the add_typo_suggestion function

This comment was added to 089810a1cb. However, the test for the comment was moved elsewhere in https://github.com/rust-lang/rust/pull/145897.
2025-12-01 18:35:12 +01:00
Matthias Krüger
c91942bcb6
Rollup merge of #149473 - reddevilmidzy:t7, r=Kivooeo
Tidying up UI tests [7/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

removed directory  `tests/ui/explicit`,  `tests/ui/interior-mutability`, `tests/ui/invalid-module-declaration`, tests/ui/invalid-self-argument`

r? Kivooeo
2025-12-01 18:35:12 +01:00
Matthias Krüger
ab2cdfc884
Rollup merge of #149433 - scottmcm:delay-layout-ICEs, r=jdonszelmann
Use a delayed bug for this layout ICE

Fixes rust-lang/rust#144501
cc `@matthiaskrgr`
2025-12-01 18:35:11 +01:00
Matthias Krüger
14da32fcf1
Rollup merge of #149427 - scrabsha:push-rxkwyumxrrtu, r=jdonszelmann
Make the capitalization explicit on keyword misspell error

Will help for https://github.com/rust-lang/rust/pull/149405.
2025-12-01 18:35:10 +01:00
Matthias Krüger
9d829acb42
Rollup merge of #149393 - tshepang:patch-3, r=davidtwco
expand valid edition range for use-path-segment-kw.rs
2025-12-01 18:35:10 +01:00
bors
a463b0e2ee Auto merge of #149510 - matthiaskrgr:rollup-5rt6o7z, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#148690 (Implement `clamp_magnitude` method for primitive floats & signed integers)
 - rust-lang/rust#149102 (stabilize maybe_uninit_slice)
 - rust-lang/rust#149269 (cmse: do not calculate the layout of a type with infer types)
 - rust-lang/rust#149299 (Fudge infer vars in the cause code of `Obligation` intentionally)
 - rust-lang/rust#149344 (Don't suggest unwrap for Result in const)
 - rust-lang/rust#149358 (fix(parse): Limit frontmatter fences to 255 dashes )
 - rust-lang/rust#149445 (make assoc fn inherit const stability from inherent `const impl` blocks)
 - rust-lang/rust#149479 (Fix indent in E0591.md)
 - rust-lang/rust#149496 (Fix rust-lang/rust#148889: Add label rib when visiting delegation body)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-01 17:16:50 +00:00
Matthias Krüger
e0091c5590
Rollup merge of #149496 - aerooneqq:ice-issue-148889, r=petrochenkov
Fix #148889: Add label rib when visiting delegation body

This PR relates to the delegation feature rust-lang/rust#118212, it fixes rust-lang/rust#148889 ICE.
r? `@petrochenkov`
2025-12-01 17:55:12 +01:00
Matthias Krüger
6900946597
Rollup merge of #149479 - reddevilmidzy:E0591, r=chenyukang
Fix indent in E0591.md

It currently looks like this.

<img width="1389" height="595" alt="image" src="https://github.com/user-attachments/assets/5336eebd-42a6-43c6-9127-9278cd82a9c2" />

https://doc.rust-lang.org/nightly/error_codes/E0591.html

So I can't run it, and the copied code has `#` in front.
2025-12-01 17:55:12 +01:00
Matthias Krüger
b0b3c92918
Rollup merge of #149445 - fee1-dead-contrib:push-msxupnksrusl, r=petrochenkov
make assoc fn inherit const stability from inherent `const impl` blocks

Pulled out of rust-lang/rust#147893, "Currently, one cannot add any const stability annotations on the individual assoc fns at all, as the specific pass that checks for const stability on const fn seems to run as a HIR visitor [and looks at HIR assoc fn constness, which should be changed to also look at its parent]. I suspect there are things to be cleaned up there."

I was slightly lazy so didn't add the "staged_api using staged_api in implicit const stable context, in const unstable context, in explicit const stable context" tests. nudge me if you want to see those!
2025-12-01 17:55:11 +01:00
Matthias Krüger
af631a5396
Rollup merge of #149358 - epage:fence-length, r=davidtwco
fix(parse): Limit frontmatter fences to 255 dashes

Like raw string literals.  As discussed on rust-lang/rust#148051.

Part of  rust-lang/rust#136889
2025-12-01 17:55:10 +01:00
Matthias Krüger
c5046a6109
Rollup merge of #149344 - lapla-cogito:const_unwrap_sugg, r=Kivooeo
Don't suggest unwrap for Result in const

close rust-lang/rust#149316

Regarding `const fn` that returns `Result`, we should avoid suggesting unwrapping. The original issue reported cases where types didn't match, but in practice, such suggestions may also appear when methods are not found, so this PR includes a fix for that case as well.
2025-12-01 17:55:08 +01:00
Matthias Krüger
b8336a5485
Rollup merge of #149299 - adwinwhite:next-245-ice, r=lcnr
Fudge infer vars in the cause code of `Obligation` intentionally

Fixes the ICE variant in https://github.com/rust-lang/trait-system-refactor-initiative/issues/245.
Fixes rust-lang/rust#142866.

The detailed cause is in the test comments.

r? `@lcnr`
2025-12-01 17:55:07 +01:00
Matthias Krüger
6e5661eefc
Rollup merge of #149269 - folkertdev:cmse-infer, r=davidtwco
cmse: do not calculate the layout of a type with infer types

tracking issue: https://github.com/rust-lang/rust/issues/81391
tracking issue: https://github.com/rust-lang/rust/issues/75835
fixes https://github.com/rust-lang/rust/issues/130104

Don't calculate the layout of a type with an infer type (`_`). This now emits `LayoutError::Unknown`, causing an error similar to when any other calling convention is used in this location.

The tests use separate functions because only the first such error in a function body is reported.

r? `@davidtwco` (might need some T-types assistance)
2025-12-01 17:55:07 +01:00
Matthias Krüger
5f3dc5d89a
Rollup merge of #149102 - bend-n:maybe_uninit_slice, r=joboet
stabilize maybe_uninit_slice

Tracking issue: rust-lang/rust#63569
Closes: rust-lang/rust#63569
FCP completed: https://github.com/rust-lang/rust/issues/63569#issuecomment-3477510504

Removes:
```rs
pub const fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T;
pub const fn slice_as_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T;
```
2025-12-01 17:55:06 +01:00
Matthias Krüger
9a967de929
Rollup merge of #148690 - IntegralPilot:clamp-mag, r=joboet
Implement `clamp_magnitude` method for primitive floats & signed integers

Tracking issue rust-lang/rust#148519
ACP https://github.com/rust-lang/libs-team/issues/686
2025-12-01 17:55:05 +01:00
Lukas Wirth
d9beb0aa58
Merge pull request #21190 from Veykril/push-puqrkvrtqxnz
fix: Fix proc-macro-srv passing invalid extra none group to proc-macros
2025-12-01 15:38:00 +00:00
Lukas Wirth
c435a5f17f fix: Fix proc-macro-srv passing invalid extra none group to proc-macros 2025-12-01 16:28:18 +01:00
Mateusz Mikuła
57a1000f13 Mark windows-gnu* as lacking build with assertions 2025-12-01 16:02:08 +01:00
bors
2fb805367d Auto merge of #149499 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to d690155841.

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

r? `@ghost`
2025-12-01 14:06:10 +00:00
Zalathar
b03a65543f Prepare ignore/only conditions once in advance, without a macro 2025-12-02 00:15:07 +11:00
reddevilmidzy
31106eb752 Update the comment in the add_typo_suggestion function 2025-12-01 21:49:40 +09:00
aerooneqq
62fe6a0143 Rename added test 2025-12-01 15:30:53 +03:00
Laurențiu Nicola
ad61e76c58
Merge pull request #21186 from lnicola/exactly-one
minor: Use `Itertools::exactly_one` in a couple more places
2025-12-01 11:03:31 +00:00
lapla
97f93df9c7
Don't suggest unwrap for Result in const 2025-12-01 19:56:38 +09:00
Laurențiu Nicola
1973e38505 Use Itertools::exactly_one in a couple more places 2025-12-01 12:53:39 +02:00
reddevilmidzy
a4a79500b5 Cleaned up some tests
fix explicit-call-to-dtor.rs
fix explicit-call-to-supertrait-dtor.rs
merge issues/issue-17740.rs with lifetimes/explicit-self-lifetime-mismatch.rs
merge bare-fn-start.rs and trait-fn.rs into invalid-self-argument.rs
add comment tests/ui/traits/catch-unwind-cell-interior-mut
2025-12-01 19:51:20 +09:00
bors
9b82a4fffe Auto merge of #149481 - RalfJung:threadid-fallback, r=joboet
ThreadId generation fallback path: avoid spurious yields

Fixes https://github.com/rust-lang/miri/issues/4737
Alternative to https://github.com/rust-lang/rust/pull/149476
Cc `@orlp` `@joboet`
2025-12-01 10:47:13 +00:00
Laurențiu Nicola
e3d314d40d
Merge pull request #21185 from rust-lang/rustc-pull
Rustc pull update
2025-12-01 10:40:59 +00:00
Laurențiu Nicola
9c44cb8bfb
Merge pull request #21171 from Veykril/push-puuqoostoysw
minor: Option-box `crate_lang_items` query result
2025-12-01 10:40:41 +00:00
aerooneqq
968376d507 Add label rib when visiting delegation body, add test 2025-12-01 12:38:12 +03:00
reddevilmidzy
77afccf73b moved and delete test
tests/ui/invalid-module-declaration/invalid-module-declaration.rs duplicated of tests/ui/modules/missing_non_modrs_mod_inline.rs
2025-12-01 15:35:17 +09:00
MolecularPilot
ae7fa32e5b Implement clamp_magnitude for floats & signed integers
Added feature gate, documentation and tests also.
2025-12-01 17:04:25 +11:00
Adwin White
b111aed11f fudge infer vars in cause code intentionally 2025-12-01 12:40:49 +08:00