]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-fn-path-elision.rs
Disallow non-explicit elided lifetimes in async fn
[rust.git] / src / test / ui / async-fn-path-elision.rs
1 // edition:2018
2
3 #![feature(async_await, await_macro)]
4 #![allow(dead_code)]
5
6 struct HasLifetime<'a>(&'a bool);
7
8 async fn error(lt: HasLifetime) { //~ ERROR implicit elided lifetime not allowed here
9     if *lt.0 {}
10 }
11
12 fn no_error(lt: HasLifetime) {
13     if *lt.0 {}
14 }
15
16 fn main() {}