-
Notifications
You must be signed in to change notification settings - Fork 13.3k
A rustc
-internal compile error on future and task API
#61482
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
Comments
rustc
-internal compile error on async/await and core future API
rustc
-internal compile error on async/await and core future APIrustc
-internal compile error on future and task API
That's just a bad panic message. You need to set the thread local context with https://doc.rust-lang.org/std/future/fn.set_task_context.html before you can use poll_with_tls_context. |
@sfackler Thank you! I'd try by creating a |
Discussed in the async-await-foundations meeting -- doesn't block stabilization, but would be a good thing to have clearer documentation. |
poll_with_tls_context should be made doc(hidden) - its a part of how await is currently implemented and not intended to ever be stabilized or to be used by end users |
Hide gen_future API from documentation This is internal rustc only API which should never be used outside code created by the current `async` transform, if it is used then the panic messages don't make sense as they're written from the perspective of that meaning there is a bug in the `async` transform (e.g. rust-lang#61482).
#61523 marked it |
Given that |
tls prerequisite was removed from future. |
Today when I tried this piece of code:
I expected to see a line of debug formatted output representing a
Poll::Pending
state is set for variableres
. However, when I execute this piece of code, a compile error occurred:And with
RUST_BACKTRACE=1
:It seems that there is an internal issue with
rustc
itself. Does anyone met the same problem or similar issues as me? Or is there something wrong with my code? BTW, I doubt that I may need to change a executor function other thanpoll_with_tls_context
.Here's my
rustc
version:I'm using
rustc
targetnightly-x86_64-pc-windows-msvc
on Windows 10.The text was updated successfully, but these errors were encountered: