From 36598fcf3e2bf7db409d60d5e2a7377e21402022 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Wed, 6 Jul 2022 10:56:35 +0200 Subject: [PATCH] Add regression test. --- src/test/incremental/async-lifetimes.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/incremental/async-lifetimes.rs diff --git a/src/test/incremental/async-lifetimes.rs b/src/test/incremental/async-lifetimes.rs new file mode 100644 index 000000000000..b97725d3b6a7 --- /dev/null +++ b/src/test/incremental/async-lifetimes.rs @@ -0,0 +1,17 @@ +// revisions: rpass1 rpass2 +// edition:2021 + +#![allow(unused)] + +struct Foo; + +impl Foo { + async fn f(&self, _: &&()) -> &() { + &() + } +} + +#[cfg(rpass2)] +enum Bar {} + +fn main() {}