Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #123869

Merged
merged 16 commits into from
Apr 12, 2024
Merged

Rollup of 7 pull requests #123869

merged 16 commits into from
Apr 12, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 16 commits April 10, 2024 19:37
This can cause rustfix to crash because the `?` suggestion previously
could point into non-local spans, such as into the stdlib.
This test contains conflicting MaybeIncorrect suggestions which will
cause the fixed file to not compile.
- Remove cmath from zkvm module since cmath was moved to sys and is
shared by all platforms (see rust-lang#120109)
The suggestion to use `let else` with an uninitialized refutable `let`
statement was erroneous: `let else` cannot be used with deferred
initialization.
…rieril

typeck: fix `?` suggestion span

Noticed in <rust-lang#112043 (comment)>, if the

```
use the `?` operator to extract the `Result<(), std::fmt::Error>` value, propagating a `Result::Err` value to the caller
```

suggestion is applied to a macro that comes from a non-local crate (e.g. the stdlib), the suggestion span can become non-local, which will cause newer rustfix versions to fail.

This PR tries to remedy the problem by recursively probing ancestors of the expression span, trying to identify the most ancestor span that is (1) still local, and (2) still shares the same syntax context as the expression.

This is the same strategy used in rust-lang#112043.

The test unfortunately cannot `//@ run-rustfix` because there are two conflicting MaybeIncorrect suggestions that when collectively applied, cause the fixed source file to become non-compilable.

Also avoid running `//@ run-rustfix` for `tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs` because that also contains conflicting suggestions.

cc `@ehuss` who noticed this. This question mark span fix + not running rustfix on the tests containing conflicting MaybeIncorrect suggestions should hopefully unblock rustfix from updating.
Remove `sys_common::thread`

Part of rust-lang#117276.

The stack size calculation isn't system-specific at all and can just live together with the rest of the spawn logic.
…-tainted-body, r=oli-obk

Don't do coroutine-closure-specific upvar analysis if tainted by errors

See the comment

Fixes rust-lang#123821
Fixes rust-lang#123818
Suppress `let else` suggestion for uninitialized refutable `let`s

Fixes rust-lang#123844

r? `@CAD97`
…og, r=ChrisDenton

std::net: TcpListener shrinks the backlog argument to 32 for Haiku.
…boet

zkvm: fix path to cmath in zkvm module

I don't know why the original author decided to use relative paths.

I think it would be better to use `use crate::sys::cmath;`

The according issue can be found here risc0/risc0#1647
Add `unsafe` to two functions with safety invariants
@rustbot rustbot added O-windows Operating system: Windows 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 Apr 12, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Apr 12, 2024

📌 Commit 3026204 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Apr 12, 2024
@bors
Copy link
Contributor

bors commented Apr 12, 2024

⌛ Testing commit 3026204 with merge 7942405...

@bors
Copy link
Contributor

bors commented Apr 12, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 7942405 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 12, 2024
@bors bors merged commit 7942405 into rust-lang:master Apr 12, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 12, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123654 typeck: fix ? suggestion span 77a1eece246b595e0935de824adb1e404d17d502 (link)
#123807 Remove sys_common::thread 245c95db447ed7cd2c7ee643b9e6874ffbffba94 (link)
#123834 Don't do coroutine-closure-specific upvar analysis if taint… f640ce00230ba8337f05a3e4f43a0b9017eddb26 (link)
#123847 Suppress let else suggestion for uninitialized refutable … 0f22d9dd380a018d34d1fba6e92fb17746cea20f (link)
#123857 std::net: TcpListener shrinks the backlog argument to 32 fo… 3d766d16005df574f1728b864d6c9b725fc2cbc3 (link)
#123858 zkvm: fix path to cmath in zkvm module 3243fc57e5df3171ed8d7913be9219f8f1f37169 (link)
#123867 Add unsafe to two functions with safety invariants e3c8a5cd64f079ef3e16ae65b3415324ddad5447 (link)

previous master: 22a2425c10

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
Collaborator

Finished benchmarking commit (7942405): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.4%, 0.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.4%, 0.5%] 2

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
5.1% [3.1%, 7.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.2% [-6.2%, -6.2%] 1
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) 1.3% [-6.2%, 7.1%] 3

Cycles

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.2%, -1.9%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.2%, -1.9%] 2

Binary size

Results

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.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.3%] 11
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.1%, 0.3%] 12

Bootstrap: 676.361s -> 676.092s (-0.04%)
Artifact size: 316.01 MiB -> 316.03 MiB (0.01%)

@matthiaskrgr matthiaskrgr deleted the rollup-9kif9c9 branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.