record upvar into GeneratorInteriorTypeCause

This commit is contained in:
csmoe 2020-05-05 23:26:33 +08:00
parent fb81c429eb
commit a5d103ff90
3 changed files with 54 additions and 23 deletions

View file

@ -1,5 +1,7 @@
// edition 2018
fn d<T: Sized>(t: T) -> impl std::future::Future<Output = T> + Send { //~ Error `T` cannot be sent between threads safely
async { t }
fn foo<T: Sized>(ty: T) -> impl std::future::Future<Output = T> + Send { //~ Error `T` cannot be sent between threads safely
async { ty }
}
fn main() {}