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

Fix type-inference regression in #112225 #112266

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Jun 4, 2023

The type inference of argument-position closures and async blocks regressed in 1.70 as the evaluation order of async blocks changed, as they are not implicitly wrapped in an identity-function anymore.

Fixes #112225 by making sure the evaluation order stays the same as it used to.

r? @compiler-errors

As this was a stable-to-stable regression, it might be worth to consider backporting. Although the workaround for this is trivial as well: Just wrap the async block in another block.

@rustbot rustbot 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. labels Jun 4, 2023
@rust-log-analyzer

This comment has been minimized.

The type inference of argument-position closures and async blocks
regressed in 1.70 as the evaluation order of async blocks changed, as
they are not implicitly wrapped in an identity-function anymore.

Fixes rust-lang#112225 by making sure the evaluation order stays the same as it
used to.
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 4, 2023

📌 Commit 75b557a 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 Jun 4, 2023
@compiler-errors compiler-errors added beta-nominated Nominated for backporting to the compiler in the beta channel. 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 Jun 4, 2023
@bors
Copy link
Contributor

bors commented Jun 4, 2023

⌛ Testing commit 75b557a with merge dcf3571...

@bors
Copy link
Contributor

bors commented Jun 5, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 5, 2023
@bors bors merged commit dcf3571 into rust-lang:master Jun 5, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 5, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (dcf3571): 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)
4.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

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

Binary size

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

Bootstrap: 646.397s -> 646.008s (-0.06%)

@pnkfelix
Copy link
Member

pnkfelix commented Jun 8, 2023

stable-nominating because this was injected in 1.70 and seems like it has somewhat unknown scope of impact

@rustbot label: +stable-nominated

@rustbot rustbot added the stable-nominated Nominated for backporting to the compiler in the stable channel. label Jun 8, 2023
@apiraino
Copy link
Contributor

Beta+stable backport accepted as per compiler team on Zulip

whether to release a point stable release (1.70.1) or not will be decided by T-infra as usual.

@rustbot label +beta-accepted +stable-accepted

@rustbot rustbot added beta-accepted Accepted for backporting to the compiler in the beta channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Jun 12, 2023
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 24, 2023
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.72.0, 1.71.0 Jun 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 24, 2023
…k-Simulacrum

[beta] backport

This PR backports:

- rust-lang#112684: Disable alignment checks on i686-pc-windows-msvc
- rust-lang#112581: [rustdoc] Fix URL encoding of % sign
- rust-lang#112312: Update to LLVM 16.0.5
- rust-lang#112266: Fix type-inference regression in rust-lang#112225
- rust-lang#112062: Make struct layout not depend on unsizeable tail

r? `@Mark-Simulacrum`
@figsoda figsoda mentioned this pull request Jul 6, 2023
12 tasks
@Mark-Simulacrum Mark-Simulacrum removed the stable-nominated Nominated for backporting to the compiler in the stable channel. label Jul 21, 2023
@Swatinem Swatinem deleted the fix-async-block-inference branch January 6, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. stable-accepted Accepted for backporting to the compiler in the stable channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.70.0: Type inference no longer works in conjunction with Glib's clone macro
9 participants