Skip to content

Rollup of 8 pull requests #118387

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 19 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgross35 and others added 19 commits August 10, 2023 16:30
rust-lang/rust-log-analyzer#75 adds a
`rla-silenced` label flag that will turn off RLA updates for non-bors
tests. Allow setting that labels and others via `rustbot`.
This cuts >100kb from a local librustc_driver.so build, and seems just
obviously simpler.
Also addressed merge conflicts upon rebasing.
On functions with a default return type that influences the coerced type
of `match` arms, check if the failing arm is actually of type `!`. If
so, suggest changing the return type so the coercion against the prior
arms is successful.

```
error[E0308]: `match` arms have incompatible types
  --> $DIR/match-tail-expr-never-type-error.rs:9:13
   |
LL |   fn bar(a: bool) {
   |                  - help: try adding a return type: `-> i32`
LL | /     match a {
LL | |         true => 1,
   | |                 - this is found to be of type `{integer}`
LL | |         false => {
LL | |             never()
   | |             ^^^^^^^
   | |             |
   | |             expected integer, found `()`
   | |             this expression is of type `!`, but it get's coerced to `()` due to its surrounding expression
LL | |         }
LL | |     }
   | |_____- `match` arms have incompatible types
```

Fix rust-lang#24157.
Otherwise the suggestions can be off-base for non-ASCII identifiers. For
example suggesting that `Ok` is a name similar to `读文`.
… r=TaKO8Ki

Detect Python-like slicing and suggest how to fix

Fix rust-lang#108215
…Simulacrum

Allow setting `rla` labels via `rustbot`

rust-lang/rust-log-analyzer#75 adds a `rla-silenced` label flag that will turn off RLA updates for non-bors tests. Allow setting that labels and others via `rustbot`.
Account for `!` arm in tail `match` expr

On functions with a default return type that influences the coerced type of `match` arms, check if the failing arm is actually of type `!`. If so, suggest changing the return type so the coercion against the prior arms is successful.

```
error[E0308]: `match` arms have incompatible types
  --> $DIR/match-tail-expr-never-type-error.rs:9:13
   |
LL |   fn bar(a: bool) {
   |                  - help: try adding a return type: `-> i32`
LL | /     match a {
LL | |         true => 1,
   | |                 - this is found to be of type `{integer}`
LL | |         false => {
LL | |             never()
   | |             ^^^^^^^
   | |             |
   | |             expected integer, found `()`
   | |             this expression is of type `!`, but it get's coerced to `()` due to its surrounding expression
LL | |         }
LL | |     }
   | |_____- `match` arms have incompatible types
```

Fix rust-lang#24157.
… r=compiler-errors

Simplify indenting in THIR printing

This cuts >100kb from a local librustc_driver.so build, and seems just obviously simpler.
…t-repr, r=compiler-errors

Detect and reject malformed `repr(Rust)` hints

Fixes rust-lang#118334.
…=compiler-errors

Add -Zunpretty=stable-mir output test

As strongly suggested here rust-lang#118364 (comment) this adds output test for `-Zunpretty=stable-mir`, added test shows almost all the functionality of the current printer.

r? ``@compiler-errors``
rustc_span: Use correct edit distance start length for suggestions

Otherwise the suggestions can be off-base for non-ASCII identifiers. For example suggesting that `Ok` is a name similar to `读文`.

Closes rust-lang#72553.
…ld-cleanup-rustdoc, r=GuillaumeGomez

Address unused tuple struct fields in rustdoc
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=8 rollup=never

@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 27, 2023
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Collaborator

bors commented Nov 27, 2023

📌 Commit bec9f90 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 27, 2023
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 27, 2023
@compiler-errors
Copy link
Member

This will (probably?) cause a test failure, for the record: #118375 (comment)

@bors
Copy link
Collaborator

bors commented Nov 27, 2023

⌛ Testing commit bec9f90 with merge 5466718...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 27, 2023
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#111133 (Detect Python-like slicing and suggest how to fix)
 - rust-lang#114708 (Allow setting `rla` labels via `rustbot`)
 - rust-lang#117526 (Account for `!` arm in tail `match` expr)
 - rust-lang#118341 (Simplify indenting in THIR printing)
 - rust-lang#118366 (Detect and reject malformed `repr(Rust)` hints)
 - rust-lang#118375 (Add -Zunpretty=stable-mir output test)
 - rust-lang#118381 (rustc_span: Use correct edit distance start length for suggestions)
 - rust-lang#118384 (Address unused tuple struct fields in rustdoc)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Nov 28, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 28, 2023
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2915/3236] Building CXX object tools/llvm-dwarfutil/CMakeFiles/llvm-dwarfutil.dir/DebugInfoLinker.cpp.o
[2916/3236] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Assembler.cpp.o
[2917/3236] Building CXX object tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/llvm-dwp.cpp.o
[2918/3236] Building CXX object tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
##[group]Clock drift check
  local time: Tue Nov 28 00:02:04 UTC 2023
  network time: Tue, 28 Nov 2023 00:02:04 GMT
##[endgroup]
---
[2948/3236] Building Opts.inc...
[2949/3236] Building Opts.inc...
[2950/3236] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/DummyISelFuzzer.cpp.o
[2951/3236] Building CXX object tools/llvm-exegesis/lib/PowerPC/CMakeFiles/LLVMExegesisPowerPC.dir/Target.cpp.o
Session terminated, killing shell... ...killed.
##[error]The operation was canceled.

@compiler-errors
Copy link
Member

Well, seems to have failed before that. But it's worth just opening a new one due to the test failure I noted. I'll do that now.

@GuillaumeGomez GuillaumeGomez deleted the rollup-hbkx6nc branch November 28, 2023 09:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.