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 9 pull requests #118395

Merged
merged 23 commits into from
Nov 28, 2023
Merged

Rollup of 9 pull requests #118395

merged 23 commits into from
Nov 28, 2023

Conversation

compiler-errors
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgross35 and others added 23 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`.
Also addressed merge conflicts upon rebasing.
…"-Wl," for cc-like linker args and not verbatim
…nd change it's return type from Option<QueryMap> to QueryMap

As there currently always Some(...) inside
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.
…nval

Add `pretty_terminator` to pretty stable-mir

~Because we don't have successors in `stable_mir` this is somewhat lacking but it's better than nothing~, also fixed bug(?) with `Opaque` which printed extra `"` when we try to print opaqued `String`.

**Edit**: Added successors so this covers Terminators as a whole.
r? `@celinval`
…, r=petrochenkov

Added linker_arg(s) Linker trait methods for link-arg to be prefixed "-Wl," for cc-like linker args and not verbatim

rust-lang#99427 (comment)

> here's one possible improvement to -l link-arg making it more portable between linkers and useful - befriending it with the verbatim modifier (rust-lang#99425).
>
> -l link-arg:-verbatim=-foo would add -Wl,-foo (or equivalent) when C compiler is used as a linker, and just -foo when bare linker is used.
> -l link-arg:+verbatim=-bar on the other hand would always pass just -bar.
…iler-errors

QueryContext: rename try_collect_active_jobs -> collect_active_jobs, change return type from Option<QueryMap> to QueryMap

As there currently always Some(...) inside.
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, r=compiler-errors

Address unused tuple struct fields in the compiler

r? `@compiler-errors`
…ld-cleanup-rustdoc, r=GuillaumeGomez

Address unused tuple struct fields in rustdoc
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 28, 2023
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Nov 28, 2023

📌 Commit 2aca724 has been approved by compiler-errors

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 Nov 28, 2023
@bors
Copy link
Contributor

bors commented Nov 28, 2023

⌛ Testing commit 2aca724 with merge c2ec908...

@bors
Copy link
Contributor

bors commented Nov 28, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing c2ec908 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 28, 2023
@bors bors merged commit c2ec908 into rust-lang:master Nov 28, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 28, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#111133 Detect Python-like slicing and suggest how to fix 88b340b01679d1a8fc0637b22c86cd7a2dfe3b50 (link)
#114708 Allow setting rla labels via rustbot 83711e61e22dd14e3596b854f2378340176275c9 (link)
#117526 Account for ! arm in tail match expr 03ffdc9d8f50e7bb16aa566e7b30f853597572e2 (link)
#118172 Add pretty_terminator to pretty stable-mir 894c7242ea677e8f0c35555ce726fbf29937b5e7 (link)
#118202 Added linker_arg(s) Linker trait methods for link-arg to be… 58846995cf6a6f6eee1b989fbe81354d8b062b3e (link)
#118374 QueryContext: rename try_collect_active_jobs -> collect_act… f1301c30ba389675c4043bc6e7742a454d0932b8 (link)
#118381 rustc_span: Use correct edit distance start length for sugg… 524b9e19ede127df13659de38278329944d2ed86 (link)
#118382 Address unused tuple struct fields in the compiler 409651457e595f8216f627e97c1d16451d55fe14 (link)
#118384 Address unused tuple struct fields in rustdoc 8d7ec26bfc739077b3802bec4bf3e95b08ff8175 (link)

previous master: 49b3924bd4

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 (c2ec908): 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

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)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 675.837s -> 674.319s (-0.22%)
Artifact size: 313.33 MiB -> 313.36 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. 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-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.