mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
14 lines
221 B
Rust
14 lines
221 B
Rust
//@ edition:2018
|
|
|
|
struct HasLifetime<'a>(&'a bool);
|
|
|
|
async fn error(lt: HasLifetime) { //~ ERROR implicit elided lifetime not allowed here
|
|
if *lt.0 {}
|
|
}
|
|
|
|
fn no_error(lt: HasLifetime) {
|
|
if *lt.0 {}
|
|
}
|
|
|
|
fn main() {}
|