rust/src/test/ui/async-fn-multiple-lifetimes.rs
2018-12-25 21:08:33 -07:00

21 lines
549 B
Rust

// edition:2018
#![feature(arbitrary_self_types, async_await, await_macro, futures_api, pin)]
use std::ops::Add;
async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {}
//~^ ERROR multiple different lifetimes used in arguments of `async fn`
async fn multiple_hrtb_and_single_named_lifetime_ok<'c>(
_: impl for<'a> Add<&'a u8>,
_: impl for<'b> Add<&'b u8>,
_: &'c u8,
) {}
async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
//~^ ERROR multiple elided lifetimes used
//~^^ ERROR missing lifetime specifier
fn main() {}