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

Enforce "joined()" and "joined_with_noop()" test #101826

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

andrewpollack
Copy link
Member

@andrewpollack andrewpollack commented Sep 14, 2022

Several similar tests come in the form of joined() and joined_with_noop(). In this test, the joined() has two calls to a noop, making it functionally equivalent to joined_with_noop(). This doesn't seem intended, and this PR removes those calls and changes the memory size to reflect the change

For my education, why do tests with noop() calls sometimes have noop() contributing to the size, while others do not? E.g. https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L115 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L116 have no size difference, whereas https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L113 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L114 have a size difference. Thank you!

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 14, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 14, 2022
@andrewpollack andrewpollack force-pushed the fix-joined-without-noop branch from 6280216 to 4279bd5 Compare September 14, 2022 21:23
@andrewpollack andrewpollack changed the title Remove noop from test that expects no noop Enforce "joined()" and "joined_with_noop()" test Sep 14, 2022
@Mark-Simulacrum
Copy link
Member

I'd need to look at the MIR or similar to know for sure, but my guess is we end up with a drop flag or something like it to keep track of whether the Box is dropped during the noop call? Not sure. Might be that we have a dedicated optimization for instantly awaiting a different future that stops triggering. You might have more success asking on Zulip about that kind of question.

This seems reasonable to me though.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 17, 2022

📌 Commit 4279bd5 has been approved by Mark-Simulacrum

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 Sep 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101093 (Initial version of 1.64 release notes)
 - rust-lang#101713 (change AccessLevels representation)
 - rust-lang#101821 (Bump Unicode to version 15.0.0, regenerate tables)
 - rust-lang#101826 (Enforce "joined()" and "joined_with_noop()" test)
 - rust-lang#101835 (Allow using vendoring when running bootstrap from outside the source root)
 - rust-lang#101942 (Revert "Copy stage0 binaries into stage0-sysroot")
 - rust-lang#101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bfbb15a into rust-lang:master Sep 18, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants