about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/higher-ranked-return.rs
blob: 328c733d42d4bdf650926b379859793042097eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ aux-build:block-on.rs
//@ edition:2021

//@ known-bug: unknown
// Borrow checking doesn't like that higher-ranked output...

extern crate block_on;

fn main() {
    block_on::block_on(async {
        let x = async move |x: &str| -> &str {
            x
        };
        let s = x("hello!").await;
    });
}