diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-24 03:33:42 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-27 00:28:54 +0000 |
| commit | b1cc95da2338af399e65c7186540e2f412c8fbe0 (patch) | |
| tree | 680e9651c23e035a7c0c7991811744396c6b4086 /src/test/ui/impl-trait | |
| parent | 1898c34e923bad763e723c68dd9f23a09f9eb0fc (diff) | |
| download | rust-b1cc95da2338af399e65c7186540e2f412c8fbe0.tar.gz rust-b1cc95da2338af399e65c7186540e2f412c8fbe0.zip | |
Remap early bound lifetimes too
Diffstat (limited to 'src/test/ui/impl-trait')
| -rw-r--r-- | src/test/ui/impl-trait/in-trait/early.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/in-trait/early.rs b/src/test/ui/impl-trait/in-trait/early.rs new file mode 100644 index 00000000000..9c1c2b50339 --- /dev/null +++ b/src/test/ui/impl-trait/in-trait/early.rs @@ -0,0 +1,23 @@ +// check-pass +// edition:2021 + +#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)] +#![allow(incomplete_features)] + +pub trait Foo { + async fn bar<'a: 'a>(&'a mut self); +} + +impl Foo for () { + async fn bar<'a: 'a>(&'a mut self) {} +} + +pub trait Foo2 { + fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a; +} + +impl Foo2 for () { + fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {} +} + +fn main() {} |
