diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2019-06-12 10:47:04 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2019-07-02 12:15:20 -0400 |
| commit | 2057136326bfac61b29b7fac87289728f105ffe3 (patch) | |
| tree | 6f731a901c11e4808e9ec4d440d2c8e3c2010171 | |
| parent | b5fb9067668383067373a4f8a07a4731209788d1 (diff) | |
| download | rust-2057136326bfac61b29b7fac87289728f105ffe3.tar.gz rust-2057136326bfac61b29b7fac87289728f105ffe3.zip | |
update the async-fn-multiple-lifetimes test
| -rw-r--r-- | src/test/ui/async-await/async-fn-multiple-lifetimes.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/async-await/async-fn-multiple-lifetimes.stderr | 20 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/test/ui/async-await/async-fn-multiple-lifetimes.rs b/src/test/ui/async-await/async-fn-multiple-lifetimes.rs index e3ac817b15c..c1202bfe219 100644 --- a/src/test/ui/async-await/async-fn-multiple-lifetimes.rs +++ b/src/test/ui/async-await/async-fn-multiple-lifetimes.rs @@ -1,11 +1,13 @@ // edition:2018 +// run-pass -#![feature(arbitrary_self_types, async_await, await_macro, pin)] +// Test that we can use async fns with multiple arbitrary lifetimes. + +#![feature(arbitrary_self_types, async_await, await_macro)] use std::ops::Add; async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {} -//~^ ERROR ambiguous lifetime bound in `async fn` async fn multiple_hrtb_and_single_named_lifetime_ok<'c>( _: impl for<'a> Add<&'a u8>, @@ -14,6 +16,5 @@ async fn multiple_hrtb_and_single_named_lifetime_ok<'c>( ) {} async fn multiple_elided_lifetimes(_: &u8, _: &u8) {} -//~^ ambiguous lifetime bound in `async fn` fn main() {} diff --git a/src/test/ui/async-await/async-fn-multiple-lifetimes.stderr b/src/test/ui/async-await/async-fn-multiple-lifetimes.stderr deleted file mode 100644 index 8c3ee2bed83..00000000000 --- a/src/test/ui/async-await/async-fn-multiple-lifetimes.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error: ambiguous lifetime bound in `async fn` - --> $DIR/async-fn-multiple-lifetimes.rs:7:65 - | -LL | async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {} - | ^ neither `'a` nor `'b` outlives the other - | - = note: multiple unrelated lifetimes are not allowed in `async fn`. - = note: if you're using argument-position elided lifetimes, consider switching to a single named lifetime. - -error: ambiguous lifetime bound in `async fn` - --> $DIR/async-fn-multiple-lifetimes.rs:16:52 - | -LL | async fn multiple_elided_lifetimes(_: &u8, _: &u8) {} - | ^ the elided lifetimes here do not outlive one another - | - = note: multiple unrelated lifetimes are not allowed in `async fn`. - = note: if you're using argument-position elided lifetimes, consider switching to a single named lifetime. - -error: aborting due to 2 previous errors - |
