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

Remove or fix some more FIXME(async_closure) #132488

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Nov 2, 2024

Self-explanatory

@rustbot
Copy link
Collaborator

rustbot commented Nov 2, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Nov 2, 2024
@@ -432,7 +432,6 @@ where
upvar.visit_with(self);
}

// FIXME(async_closures): Is this the right signature to visit here?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it gets the job done.

@@ -5,9 +5,6 @@
//@[v0] compile-flags: -Csymbol-mangling-version=v0
//@[legacy] compile-flags: -Csymbol-mangling-version=legacy -Zunstable-options

// FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed.

@@ -38,7 +38,10 @@ fn through_field_and_ref<'a>(x: &S<'a>) {

let c = async move || { println!("{}", *x.0); };
outlives::<'a>(c());
// outlives::<'a>(call_once(c)); // FIXME(async_closures): Figure out why this fails

// outlives::<'a>(call_once(c));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation for why this fails, since I understand it now, and it's totally expected.

@@ -126,7 +126,7 @@ async fn async_main() {
{
let mut s = S { a: 1, b: Drop("drop first"), c: Drop("untouched") };
let c = guidance!(async move || {
// s.a = 2; // FIXME(async_closures): Figure out why this fails
s.a = 2;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed!

@@ -38,10 +38,12 @@ fn through_field_and_ref<'a>(x: &S<'a>) {
let c = async || { println!("{}", *x.0); }; //~ ERROR `x` does not live long enough
outlives::<'a>(c());
outlives::<'a>(call_once(c)); //~ ERROR explicit lifetime required in the type of `x`
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into two functions since one error actually just suppresses the other (due to NLL error deduplication, I believe).

let c = async move || { println!("{}", *x.0); };
outlives::<'a>(c()); //~ ERROR `c` does not live long enough
// outlives::<'a>(call_once(c)); // FIXME(async_closures): Figure out why this fails
outlives::<'a>(call_once(c)); //~ ERROR explicit lifetime required in the type of `x`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected to fail for the same reason as I elaborated above in tests/ui/async-await/async-closures/no-borrow-from-env.rs.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jieyouxu
Copy link
Member

jieyouxu commented Nov 2, 2024

r? jieyouxu
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 2, 2024

📌 Commit 9e5e47f has been approved by jieyouxu

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 2, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 2, 2024
…=jieyouxu

Remove or fix some more `FIXME(async_closure)`

Self-explanatory
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Nov 2, 2024
…=jieyouxu

Remove or fix some more `FIXME(async_closure)`

Self-explanatory
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 2, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#131037 (Move versioned Apple LLVM targets from `rustc_target` to `rustc_codegen_ssa`)
 - rust-lang#132170 (Add a Few Codegen Tests)
 - rust-lang#132333 (rust_analyzer_helix.toml: add library/ manifest)
 - rust-lang#132398 (Add a couple of intra-doc links to str)
 - rust-lang#132411 (CI: switch dist-x86_64-musl to free runner)
 - rust-lang#132453 (Also treat `impl` definition parent as transparent regarding modules)
 - rust-lang#132457 (Remove needless #![feature(asm_experimental_arch)] from loongarch64 inline assembly test)
 - rust-lang#132465 (refactor(config): remove FIXME statement in comment of `omit-git-hash`)
 - rust-lang#132466 (Account for late-bound depth when capturing all opaque lifetimes.)
 - rust-lang#132471 (Add a bunch of mailmap entries)
 - rust-lang#132488 (Remove or fix some more `FIXME(async_closure)`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 30497b0 into rust-lang:master Nov 2, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 2, 2024
Rollup merge of rust-lang#132488 - compiler-errors:more-fixmes-bye, r=jieyouxu

Remove or fix some more `FIXME(async_closure)`

Self-explanatory
@rustbot rustbot added this to the 1.84.0 milestone Nov 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 2, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#131037 (Move versioned Apple LLVM targets from `rustc_target` to `rustc_codegen_ssa`)
 - rust-lang#132398 (Add a couple of intra-doc links to str)
 - rust-lang#132453 (Also treat `impl` definition parent as transparent regarding modules)
 - rust-lang#132457 (Remove needless #![feature(asm_experimental_arch)] from loongarch64 inline assembly test)
 - rust-lang#132465 (refactor(config): remove FIXME statement in comment of `omit-git-hash`)
 - rust-lang#132466 (Account for late-bound depth when capturing all opaque lifetimes.)
 - rust-lang#132471 (Add a bunch of mailmap entries)
 - rust-lang#132488 (Remove or fix some more `FIXME(async_closure)`)

r? `@ghost`
`@rustbot` modify labels: rollup
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