Commit Graph

291081 Commits

Author SHA1 Message Date
Jieyou Xu
3ebdc87812 triagebot: add doc link to [assign] 2025-05-31 23:48:47 +08:00
Amanda Stjerna
95115b907b Drive-by refactor: use OnceCell for the reverse region SCC graph 2025-05-31 17:46:07 +02:00
Jieyou Xu
776d768bd6 triagebot: setup rustc-dev-guide adhoc-group
So that PR authors can opt-in to request review via
`r? rustc-dev-guide`.
2025-05-31 23:26:32 +08:00
Jieyou Xu
5881eb8b74 triagebot: fix incorrect link 2025-05-31 23:21:43 +08:00
bors
852f15c0f1 Auto merge of #141685 - orlp:inplace-tls-drop, r=joboet
Do not move thread-locals before dropping

Fixes rust-lang/rust#140816. I also (potentially) improved the speed of `get_or_init` a bit by having an explicit hot/cold path.

We still move the value before dropping in the event of a recursive initialization (leading to double-initialization with one value being silently dropped). This is the old behavior, but changing this to panic instead would involve changing tests and also the other OS-specific `thread_local/os.rs` implementation, which is more than I'd like in this PR.
2025-05-31 14:56:33 +00:00
Kivooeo
afc64242b6 cleaned up some tests 2025-05-31 19:49:19 +05:00
xizheyin
3cba746b49 std: note that std::str::from_utf8* functions are aliases to std::<str>::from_utf8* methods
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-31 22:37:59 +08:00
Mateusz Mikuła
885184ae41 Shared libLLVM linking is officially supported with MinGW and Clang 2025-05-31 16:06:08 +02:00
Mateusz Mikuła
7eea11b27c Fix C++ standard library name for *-windows-gnullvm targets 2025-05-31 15:58:43 +02:00
Mateusz Mikuła
98961cd3da Fix incorrect comment 2025-05-31 15:58:43 +02:00
Noratrieb
ba5a7444c3 Warn when gold was used as the linker
gold has been deprecated recently and is known to behave incorrectly
around Rust programs, including miscompiling `#[used(linker)]`.
Tell people to switch to a different linker instead.

Co-Authored-By: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2025-05-31 13:51:39 +00:00
Mateusz Mikuła
81f61acf77 rustc_llvm: add Windows system libs only when cross-compiling from Windows
This obviously doesn't work when cross-compiling from Linux.

Split out from: https://github.com/rust-lang/rust/pull/140772
2025-05-31 15:47:14 +02:00
Lukas Wirth
01a1908a46 Merge pull request #19900 from Veykril/push-zurosouxqxzz
fix: Fix manual not containing diagnostics documentation
2025-05-31 12:47:26 +00:00
Lukas Wirth
2428070096 fix: Fix manual not containing diagnostics documentation 2025-05-31 14:36:29 +02:00
Lukas Wirth
cac7468d00 Merge pull request #19899 from SomeoneToIgnore/generate-actions
Account for `Generate` actions when filtering the allowed ones
2025-05-31 12:34:33 +00:00
Mateusz Mikuła
7e9aee773a Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows 2025-05-31 14:27:26 +02:00
Philipp Krones
8ac5f7fe18 Update Cargo.lock 2025-05-31 14:22:28 +02:00
Philipp Krones
cce4ea9450 Merge commit '57cbadd68ac473bc50453f6b1320a02b68115f12' 2025-05-31 14:22:15 +02:00
Philipp Krones
57cbadd68a Rustup (#14938)
r? @ghost

changelog: none
2025-05-31 12:16:32 +00:00
Philipp Krones
cd71411f56 Bump nightly version -> 2025-05-31 2025-05-31 14:11:00 +02:00
Philipp Krones
384b53eee2 Merge remote-tracking branch 'upstream/master' into rustup 2025-05-31 14:09:03 +02:00
bors
738c08b63c Auto merge of #141453 - compiler-errors:pgo-solver, r=Kobzol
[DONT MERGE] PGO new solver

🤔

I hope I did this right...
2025-05-31 11:34:06 +00:00
Michael Goulet
3253de651f Add some new solver to PGO 2025-05-31 09:54:28 +00:00
Kirill Bulatov
1b9fb33652 Account for Generate actions when filtering the allowed ones 2025-05-31 12:29:50 +03:00
llogiq
2948678647 Fix dbg_macro fail to handle async coroutine desugar (#14937)
Closes rust-lang/rust-clippy#14914

----

changelog: [`dbg_macro`]: fix mishandling of async coroutine desugar
2025-05-31 08:47:19 +00:00
bors
e0d014a3df Auto merge of #141678 - Kobzol:revert-141516, r=workingjubilee
Revert "increase perf of charsearcher for single ascii characters"

This reverts commit 245bf503e2 (PR https://github.com/rust-lang/rust/pull/141516).

It caused a large `doc` perf. regression in https://github.com/rust-lang/rust/pull/141605.
2025-05-31 08:11:06 +00:00
yanglsh
76316488e8 fix: dbg_macro fail to handle async coroutine desugar 2025-05-31 15:44:36 +08:00
Ralf Jung
c37010f8d6 Merge pull request #4361 from nia-e/remove-oopsie
Remove useless file
2025-05-31 06:22:44 +00:00
Nia Espera
669ebcad12 accidentally committed file 2025-05-31 07:55:24 +02:00
Ralf Jung
49a99cb81b Merge pull request #4360 from rust-lang/rustup-2025-05-31
Automatic Rustup
2025-05-31 05:52:59 +00:00
Lukas Wirth
9c45a45061 Merge pull request #19898 from Veykril/push-ykumpuwmuvmu
refactor: Remove unncessary duplication in highlight_related
2025-05-31 05:35:49 +00:00
Lukas Wirth
ed508c74ac refactor: Remove unncessary duplication in highlight_related 2025-05-31 07:25:03 +02:00
The Miri Cronjob Bot
449ec7b3fe Merge from rustc 2025-05-31 05:01:23 +00:00
The Miri Cronjob Bot
34cdfb75c1 Preparing for merge from rustc 2025-05-31 04:54:03 +00:00
bors
ec28ae9454 Auto merge of #141667 - lqd:lazy-maybe-init, r=matthewjasper
Add fast path for maybe-initializedness in liveness

r? `@matthewjasper`

Correct me if I'm wrong Matthew, but my understanding is that
1. `MaybeInitializedPlaces` is currently eagerly computed, in `do_mir_borrowck`
2. but this data is only used in liveness
3. and `liveness::trace` actually only uses it for drop-liveness

This PR moves the computation to `liveness::trace` which looks to be its only use-site. We also add a fast path there, so that it's only computed by drop-liveness.

This is interesting because 1) liveness is only computed for relevant live locals, 2) drop-liveness is only computed for relevant live locals with >0 drop points; 0 is the common case from our benchmarks, as far as I can tell, so even just computing the entire data lazily helps.

It seems possible to also reduce the domain here, and speed up the analysis for the cases where it has to be computed -- so I've left a fixme for that, and may look into it soon.

(I've come upon this while doing implementation work for polonius, so don't be too enamored with possible wins: the goal is to reduce the eventual polonius overhead and make it more palatable 😓)
2025-05-31 04:52:37 +00:00
xizheyin
17352e6937 Note ref expr being cast when encounter NonScalar cast error
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-31 12:19:55 +08:00
xizheyin
cea87ecad6 std: clarify Clone trait documentation about duplication semantics
This commit improves the Clone trait documentation to address confusion
around what "duplication" means for different types, especially for smart
pointers like Arc<Mutex<T>>.

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-31 12:01:57 +08:00
bors
7a7bcbbcdb Auto merge of #141796 - weihanglo:update-cargo, r=weihanglo
Update cargo

12 commits in 68db37499f2de8acef704c73d9031be6fbcbaee4..64a12460708cf146e16cc61f28aba5dc2463bbb4
2025-05-22 14:27:15 +0000 to 2025-05-30 18:25:08 +0000
- chore: remove HTML comments and inline guide (rust-lang/cargo#15613)
- Add .git-blame-ignore-revs (rust-lang/cargo#15612)
- refactor: cleanup for `CompileMode` (rust-lang/cargo#15608)
- refactor: separate "global" mode from CompileMode (rust-lang/cargo#15601)
- fix(doc): pass `toolchain-shared-resources` to get doc styled (rust-lang/cargo#15605)
- fix(embedded): Resolve multiple bugs in frontmatter parser (rust-lang/cargo#15573)
- chore: Upgrade schemars (rust-lang/cargo#15602)
- Update gix & socket2 (rust-lang/cargo#15600)
- Add `-Zfix-edition` (rust-lang/cargo#15596)
- chore(toml): disable `toml`'s default features, unless necessary (rust-lang/cargo#15598)
- docs(README): fix the link to the changelog in the Cargo book (rust-lang/cargo#15597)
- Add the future edition (rust-lang/cargo#15595)

r? ghost
2025-05-31 01:33:21 +00:00
bors
0b00e6847b Auto merge of #141791 - workingjubilee:rollup-qnqicy9, r=workingjubilee
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#140825 (Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if`)
 - rust-lang/rust#141077 (Fix the issue of typo of comma in arm parsing)
 - rust-lang/rust#141237 (Implement ((un)checked_)exact_div methods for integers)
 - rust-lang/rust#141494 (mir-opt: Do not transform non-int type in match_branches)
 - rust-lang/rust#141609 (core: begin deduplicating pointer docs)
 - rust-lang/rust#141768 (ci: use arm to calculate job matrix)
 - rust-lang/rust#141771 (Increase timeout for new bors try builds)
 - rust-lang/rust#141781 (Fix spans for unsafe binders)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-30 22:14:00 +00:00
Weihang Lo
01541e177c Update cargo 2025-05-30 17:23:09 -04:00
Jubilee
955ebfc7d3 Rollup merge of #141781 - matthewjasper:unused-unsafe-lifetimes, r=compiler-errors
Fix spans for unsafe binders

closes rust-lang/rust#141758

r? ``@compiler-errors``
2025-05-30 13:52:28 -07:00
Jubilee
f91dc5d28f Rollup merge of #141771 - Kobzol:bors-increase-timeout, r=marcoieni
Increase timeout for new bors try builds

To sync it with [homu](https://github.com/rust-lang/homu/blob/master/cfg.production.toml#L34). Saw the timeout [here](https://github.com/rust-lang/rust/pull/138699#issuecomment-2922456283), it was set to only 4 hours for new bors.

r? ``@marcoieni``
2025-05-30 13:52:28 -07:00
Jubilee
acde85c7cf Rollup merge of #141768 - marcoieni:calculate-matrix-arm, r=Kobzol
ci: use arm to calculate job matrix
2025-05-30 13:52:27 -07:00
Jubilee
ad884fa553 Rollup merge of #141609 - lolbinarycat:core-dedup-ptr-docs-139190, r=workingjubilee
core: begin deduplicating pointer docs

this also cleans up two inconsistancies:
1. both doctests on the ::add methods were actually calling the const version.
2. on of the ::offset methods was missing a line of clarification.

part of https://github.com/rust-lang/rust/issues/139190
2025-05-30 13:52:27 -07:00
Jubilee
3846f2f08f Rollup merge of #141494 - dianqk:match-br-non-int, r=wesleywiser
mir-opt: Do not transform non-int type in match_branches

Fixes #141378.

r? mir-opt
2025-05-30 13:52:26 -07:00
Jubilee
a1d70ed5b0 Rollup merge of #141237 - Qelxiros:139911-exact-div, r=workingjubilee
Implement ((un)checked_)exact_div methods for integers

tracking issue: #139911

I see that there might still be some bikeshedding to be done, so if people want changes to this implementation, I'm happy to make those. I did also see that there was a previous attempt at this PR (#116632), but I'm not sure why it got closed.
2025-05-30 13:52:25 -07:00
Jubilee
5e139db47b Rollup merge of #141077 - chenyukang:yukang-fix-140991-comma, r=wesleywiser
Fix the issue of typo of comma in arm parsing

Fixes #140991

I also checked is it a '/', since it's near from ',' from keyboard.
2025-05-30 13:52:25 -07:00
Jubilee
a7e56bff08 Rollup merge of #140825 - rs-sac:ext, r=workingjubilee
Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if`

This new parameter was requested in the btree_extract_if tracking issue:  https://github.com/rust-lang/rust/issues/70530#issuecomment-2486566328

I attempted to follow the style used by `Vec::extract_if`.

Before:

```rust
impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
    #[unstable(feature = "btree_extract_if", issue = "70530")]
    pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
    where
        K: Ord,
        F: FnMut(&K, &mut V) -> bool;
}
```

After:

```rust
impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
    #[unstable(feature = "btree_extract_if", issue = "70530")]
    pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A>
    where
        K: Ord,
        R: RangeBounds<K>,
        F: FnMut(&K, &mut V) -> bool;
}
```

Related: #70530

—

While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.
2025-05-30 13:52:24 -07:00
Lukas Wirth
deeb464492 Merge pull request #19896 from Veykril/push-qyutrlxyznum
internal: Restructure some semantics APIs for virtual macro files
2025-05-30 20:15:15 +00:00
Lukas Wirth
1383bca55c internal: Restructure some semantics APIs for virtual macro files 2025-05-30 22:03:04 +02:00