Skip to content

Rollup of 6 pull requests - #133135

Merged
bors merged 17 commits into
rust-lang:masterfrom
jieyouxu:rollup-4q1wbyq
Nov 17, 2024
Merged

Rollup of 6 pull requests#133135
bors merged 17 commits into
rust-lang:masterfrom
jieyouxu:rollup-4q1wbyq

Conversation

@jieyouxu

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

veluca93and others added 17 commits November 14, 2024 08:57
Separate `RemoveLet` span into primary span for `let` and removal
suggestion span for `let `, so that primary span does not include
whitespace.
Fixes: rust-lang#133031
Signed-off-by: Tyrone Wu <wudevelops@gmail.com>
Look at the expression that was parsed when trying to recover from a bad `if` condition to determine what was likely intended by the user beyond "maybe this was meant to be an `else` body".
```
error: expected `{`, found `map`
--> $DIR/missing-dot-on-if-condition-expression-fixable.rs:4:30
|
LL | for _ in [1, 2, 3].iter()map(|x| x) {}
| ^^^ expected `{`
|
help: you might have meant to write a method call
|
LL | for _ in [1, 2, 3].iter().map(|x| x) {}
| +
```
If a macro statement has been parsed after `else`, suggest a missing `if`:
```
error: expected `{`, found `falsy`
--> $DIR/else-no-if.rs:47:12
|
LL | } else falsy! {} {
| ---- ^^^^^
| |
| expected an `if` or a block after this `else`
|
help: add an `if` if this is the condition of a chained `else if` statement
|
LL | } else if falsy! {} {
| ++
```
…ngjubilee
ABI checks: add support for some tier3 arches, warn on others.
Followup to
- rust-lang#132842
- rust-lang#132173
- rust-lang#131800
r? ``@workingjubilee``
Increase accuracy of `if` condition misparse suggestion
Fixrust-lang#132656.
Look at the expression that was parsed when trying to recover from a bad `if` condition to determine what was likely intended by the user beyond "maybe this was meant to be an `else` body".
```
error: expected `{`, found `map`
--> $DIR/missing-dot-on-if-condition-expression-fixable.rs:4:30
|
LL | for _ in [1, 2, 3].iter()map(|x| x) {}
| ^^^ expected `{`
|
help: you might have meant to write a method call
|
LL | for _ in [1, 2, 3].iter().map(|x| x) {}
| +
```
If a macro statement has been parsed after `else`, suggest a missing `if`:
```
error: expected `{`, found `falsy`
--> $DIR/else-no-if.rs:47:12
|
LL | } else falsy! {} {
| ---- ^^^^^
| |
| expected an `if` or a block after this `else`
|
help: add an `if` if this is the condition of a chained `else if` statement
|
LL | } else if falsy! {} {
| ++
```
…n, r=jieyouxu
Trim whitespace in RemoveLet primary span
Separate `RemoveLet` span into primary span for `let` and removal suggestion span for `let `, so that primary span does not include whitespace.
Fixes: rust-lang#133031
Let chains tests
Filing this as this marks off two of the open issues in rust-lang#132833:
* extending the tests for `move-guard-if-let-chain.rs` and `conflicting_bindings.rs` to have chains with multiple let's (one implementation could for example search for the first `let` and then terminate).
* An instance where a temporary lives shorter than with nested ifs, breaking compilation: rust-lang#103476. This was fixed in the end by the if let rescoping work.
Closesrust-lang#103476
stabilize const_ptr_is_null
FCP passed in rust-lang#74939.
The second commit cleans up const stability around UB checks a bit, now that everything they need (except for `const_eval_select`) is stable.
Fixesrust-lang#74939
alloc: fix `String`'s doc
Just a minor fix for `String` struct.
@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 17, 2024
@jieyouxu

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Nov 17, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit defc866 has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2024
@bors

bors commented Nov 17, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit defc866 with merge a8e75c5...

@bors

bors commented Nov 17, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing a8e75c5 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Nov 17, 2024
@bors
bors merged commit a8e75c5 into rust-lang:masterNov 17, 2024
@rustbotrustbot added this to the 1.84.0 milestone Nov 17, 2024
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#133029ABI checks: add support for some tier3 arches, warn on othe…56a94ab85ef1075f6515d9fa830b9982e09f7f3c (link)
#133051Increase accuracy of if condition misparse suggestiond8ab2b1832ae71a42007948723cf29bd190a90eb (link)
#133060Trim whitespace in RemoveLet primary span745b48d014cf8403e520f8acee34f8e1a6fbc11f (link)
#133093Let chains tests43f2072deafc59869f0b7691d433326426ec02a8 (link)
#133116stabilize const_ptr_is_nullf6dc7339eac5eb716630ac8dedf38a2ca410732c (link)
#133126alloc: fix String's doc4f9f305bc1e148a30ffbb87ee741cdb518a471ed (link)

previous master: 23e7ecb349

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a8e75c5): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.4%, secondary -0.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
3.4%[3.4%, 3.4%]1
Regressions ❌
(secondary)
2.7%[2.7%, 2.7%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.5%[-2.5%, -2.5%]2
All ❌✅ (primary)3.4%[3.4%, 3.4%]1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 789.761s -> 788.509s (-0.16%)
Artifact size: 335.51 MiB -> 335.54 MiB (0.01%)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@jieyouxu@bors@rust-timer@rustbot@veluca93@ver-nyan@est31@estebank@RalfJung@ohno418