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 8 pull requests #121055

Merged
merged 18 commits into from
Feb 14, 2024
Merged

Rollup of 8 pull requests #121055

merged 18 commits into from
Feb 14, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 18 commits February 13, 2024 05:06
`compile_fail` should only be used when the code is meant to show
what *not* to do. In other words, there should be a fundamental flaw
in the code. However, in this case, the example is just incomplete,
so we should use `ignore` to avoid confusing readers.
So it follows the same pattern as all the other `struct_span_*` methods.
There are a couple of places where we call
`inner.emitter.emit_diagnostic` directly rather than going through
`inner.emit_diagnostic`, to guarantee the diagnostic is printed. This
feels dubious to me, particularly the bypassing of `TRACK_DIAGNOSTIC`.

This commit removes those.
- In `print_error_count`, it uses `ForceWarning` instead of `Warning`.
- It removes `DiagCtxtInner::failure_note`, because it only has three
  uses and direct use of `emit_diagnostic` is consistent with other
  similar locations.
- It removes `force_print_diagnostic`, and adds `struct_failure_note`,
  and updates `print_query_stack` accordingly, which makes it more
  normal. That location doesn't seem to need forced printing anyway.
Several fields were not being reset. Using destructuring makes it much
harder to miss a field.
… r=lcnr

Check normalized call signature for WF in mir typeck

Unfortunately we don't check that the built-in implementations for `Fn*` traits are actually well-formed in the same way that we do for user-provided impls.

Essentially, when checking a call terminator, we end up with a signature that references an unnormalized `<[closure] as FnOnce<...>>::Output` in its output. That output type, due to the built-in impl, doesn't follow the expected rule that `WF(ty)` implies `WF(normalized(ty))`. We fix this by also checking the normalized signature here.

**See** boxy's detailed and useful explanation comment which explains this in more detail: rust-lang#114936 (comment)

Fixes rust-lang#114936
Fixes rust-lang#118876

r? types
cc ``@BoxyUwU`` ``@lcnr``
…ram, r=notriddle

rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`

Probably better known as `SubstParam` (until rust-lang#120958 which should've probably renamed it to `InstantiatedParam` but anyways).

It doesn't make any sense to me why it should exist as a separate type. `GenericArg` is exactly what we want here anyways from a semantic perspective. Both have the same size btw.

I also took the liberty of doing some drive-by cleanups.
remove unnecessary calls to `commit_if_ok`

we propagate the error outwards, so anything which wants to discard the error should do so itself.

r? types
…ion, r=jsha

Remove jsha from the rustdoc review rotation

As discussed
r? ``@jsha``
…tic, r=oli-obk

Remove `force_print_diagnostic`

More diagnostic cleanups, best reviewed one at a time.

r? `@oli-obk`
add lcnr to the compiler-team assignment group
… r=Nilstrieb

Fix incorrect use of `compile_fail`

`compile_fail` should only be used when the code is meant to show what *not* to do. In other words, there should be a fundamental flaw in the code. However, in this case, the example is just incomplete, so we should use `ignore` to avoid confusing readers.
Do not assemble candidates for default impls

There is no reason (as far as I can tell?) that we should assemble an impl candidate for a default impl. This candidate itself does not prove that the impl holds, and any time that it *does* hold, there will be a more specializing non-default impl that also is assembled.

This is because `default impl<T> Foo for T {}` actually expands to `impl<T> Foo for T where T: Foo {}`. The only way to satisfy that where clause (without coinduction) is via *another* implementation that does hold -- precisely an impl that specializes it.

This should fix the specialization related regressions for rust-lang#116494. That should lead to one root crate regression that doesn't have to do with specialization, which I think we can regress.

r? lcnr cc ``@rust-lang/types``

cc rust-lang#31844
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. 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-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Feb 13, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit ab1fa19 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 Feb 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121014 (Remove `force_print_diagnostic`)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

r? `@ghost`
`@rustbot` modify labels: rollup
@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)
test [mir-opt] tests/mir-opt/unreachable_diverging.rs ... ok
test [mir-opt] tests/mir-opt/unusual_item_types.rs ... ok
test [mir-opt] tests/mir-opt/reference_prop.rs ... ok
test [mir-opt] tests/mir-opt/inline/polymorphic_recursion.rs has been running for a long time
##[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: Wed Feb 14 00:01:46 UTC 2024
  local time: Wed Feb 14 00:01:46 UTC 2024
Session terminated, killing shell... ...killed.
##[error]The operation was canceled.
Cleaning up orphan processes

@bors
Copy link
Contributor

bors commented Feb 14, 2024

💔 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 Feb 14, 2024
@compiler-errors
Copy link
Member

@bors retry

@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 Feb 14, 2024
@bors
Copy link
Contributor

bors commented Feb 14, 2024

⌛ Testing commit ab1fa19 with merge 63ef3b2...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121014 (Remove `force_print_diagnostic`)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

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

bors commented Feb 14, 2024

💔 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 Feb 14, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 0.3s done
#1 creating container buildx_buildkit_strange_clarke0
#1 22.08 error: failed to list workers: Unavailable: connection error: desc = "transport: error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"
#1 ERROR: exit code 1
------
 > [internal] booting buildkit:
 > [internal] booting buildkit:
22.08 error: failed to list workers: Unavailable: connection error: desc = "transport: error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"
ERROR: exit code 1
Command failed. Attempt 2/5:
Command failed. Attempt 2/5:
error: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory
ERROR: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: EOF"
Command failed. Attempt 3/5:
error: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory
ERROR: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: EOF"
Command failed. Attempt 4/5:
error: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory
ERROR: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: EOF"
Command failed. Attempt 5/5:
error: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory
ERROR: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: EOF"
##[error]Process completed with exit code 1.
Post job cleanup.

@matthiaskrgr
Copy link
Member Author

@bors retry

@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 Feb 14, 2024
@bors
Copy link
Contributor

bors commented Feb 14, 2024

⌛ Testing commit ab1fa19 with merge 7508c3e...

@bors
Copy link
Contributor

bors commented Feb 14, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118882 Check normalized call signature for WF in mir typeck 68a543d6bf908a65b4a88af8bde140eb564bd88d (link)
#120999 rustdoc: replace clean::InstantiationParam with `clean::G… 80b84e96dfef95d3e578bf39b89cd8fab6c955d3 (link)
#121002 remove unnecessary calls to commit_if_ok 6fb52c2e3b6e9f05d2bb6cdaed9cb40efc930d95 (link)
#121005 Remove jsha from the rustdoc review rotation b535798e4b459764b128720d194c17d1381b210d (link)
#121014 Remove force_print_diagnostic 2f4432c08d30f27bfe887d68a8a1ce5447849cdf (link)
#121043 add lcnr to the compiler-team assignment group fcf04eee41c272afc276cb8544239c562d26ed27 (link)
#121046 Fix incorrect use of compile_fail 535debf6a77b551635eb01cc2387377526b59002 (link)
#121047 Do not assemble candidates for default impls 103021932e3885f3eae780aa826296dbf5b63ebf (link)

previous master: 37b65339c8

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 (7508c3e): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2% [0.2%, 0.2%] 2
Regressions ❌
(secondary)
0.9% [0.8%, 0.9%] 2
Improvements ✅
(primary)
-0.9% [-1.8%, -0.2%] 9
Improvements ✅
(secondary)
-0.6% [-1.1%, -0.3%] 21
All ❌✅ (primary) -0.7% [-1.8%, 0.2%] 11

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)
- - 0
Improvements ✅
(primary)
-2.5% [-2.8%, -2.1%] 2
Improvements ✅
(secondary)
-8.7% [-8.7%, -8.7%] 1
All ❌✅ (primary) -2.5% [-2.8%, -2.1%] 2

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)
-1.7% [-2.6%, -1.2%] 6
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) -1.7% [-2.6%, -1.2%] 6

Binary size

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

Bootstrap: 631.732s -> 630.069s (-0.26%)
Artifact size: 305.05 MiB -> 305.08 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Feb 14, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Feb 14, 2024

Improvements outweigh the regressions. Nice diesel cycle wins.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Feb 14, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-bzn5sda branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. 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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.