-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
@@ -432,7 +432,6 @@ where | |||
upvar.visit_with(self); | |||
} | |||
|
|||
// FIXME(async_closures): Is this the right signature to visit here? |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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` | |||
} |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
r? jieyouxu |
…=jieyouxu Remove or fix some more `FIXME(async_closure)` Self-explanatory
…=jieyouxu Remove or fix some more `FIXME(async_closure)` Self-explanatory
…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
Rollup merge of rust-lang#132488 - compiler-errors:more-fixmes-bye, r=jieyouxu Remove or fix some more `FIXME(async_closure)` Self-explanatory
…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
Self-explanatory