Skip to content

Commit 2f77d5f

Browse files
authored
Rollup merge of #70131 - Aaron1011:fix/issue-55099-test, r=nikomatsakis
Add regression test for TAIT lifetime inference (issue #55099) Fixes #55099 The minimized reproducer in issue #55099 now compiles successfully. This commit adds a regression test for it.
2 parents 532133b + fda913b commit 2f77d5f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
6+
#![feature(type_alias_impl_trait)]
7+
8+
trait Future {
9+
}
10+
11+
struct AndThen<F>(F);
12+
13+
impl<F> Future for AndThen<F> {
14+
}
15+
16+
struct Foo<'a> {
17+
x: &'a mut (),
18+
}
19+
20+
type F = impl Future;
21+
22+
impl<'a> Foo<'a> {
23+
fn reply(&mut self) -> F {
24+
AndThen(|| ())
25+
}
26+
}
27+
28+
fn main() {}

0 commit comments

Comments
 (0)