mirror of
https://git.proxmox.com/git/rustc
synced 2025-10-15 18:44:56 +00:00
13 lines
315 B
Rust
13 lines
315 B
Rust
// edition:2021
|
|
|
|
#![feature(async_closure)]
|
|
|
|
fn main() {
|
|
let x = async move |x: &str| {
|
|
//~^ ERROR lifetime may not live long enough
|
|
// This error is proof that the `&str` type is higher-ranked.
|
|
// This won't work until async closures are fully impl'd.
|
|
println!("{x}");
|
|
};
|
|
}
|