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

Playing with async triggers compiler bug "TLS Waker not set" #58814

snakehand opened this Issue Feb 28, 2019 · 1 comment


None yet
3 participants
Copy link

snakehand commented Feb 28, 2019


extern crate core;
use std::future::Future;
use core::{pin::Pin, task::Poll};

async fn tst() -> i32 {

fn main() {
    let mut a = tst();
    let b = std::future::poll_with_tls_waker(unsafe { Pin::new_unchecked(&mut a) });
    println!("{:?}", b);

rustc 1.34.0-nightly (aadbc45 2019-02-23)


thread 'main' panicked at 'TLS Waker not set. This is a rustc bug. Please file an issue on', src/libcore/

This comment has been minimized.

Copy link

cramertj commented Mar 1, 2019

This is intended. Those functions aren't designed to be stable, ever-- they're compiler implementation details.

@cramertj cramertj closed this Mar 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.