]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-55099-lifetime-inference.rs
CommitLineData
ba9703b0
XL
1// check-pass
2// Regression test for issue #55099
3// Tests that we don't incorrectly consider a lifetime to part
4// of the concrete type
5
6a06907d
XL
6// revisions: min_tait full_tait
7#![feature(min_type_alias_impl_trait)]
8#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
9//[full_tait]~^ WARN incomplete
ba9703b0
XL
10
11trait Future {
12}
13
14struct AndThen<F>(F);
15
16impl<F> Future for AndThen<F> {
17}
18
19struct Foo<'a> {
20 x: &'a mut (),
21}
22
23type F = impl Future;
24
25impl<'a> Foo<'a> {
26 fn reply(&mut self) -> F {
27 AndThen(|| ())
28 }
29}
30
31fn main() {}