add ui test for issue-62097

This commit is contained in:
csmoe 2019-10-24 01:25:05 +08:00
parent 9248b019b2
commit b380d35849

View File

@ -0,0 +1,19 @@
// edition:2018
async fn foo<F>(fun: F)
where
F: FnOnce() + 'static
{
fun()
}
struct Struct;
impl Struct {
pub async fn run_dummy_fn(&self) { //~ ERROR cannot infer
foo(|| self.bar()).await;
}
pub fn bar(&self) {}
}
fn main() {}