add ui test for issue-62097
This commit is contained in:
parent
9248b019b2
commit
b380d35849
19
src/test/ui/async-await/issues/issue-62097.rs
Normal file
19
src/test/ui/async-await/issues/issue-62097.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user