Skip to content

Commit 7927f09

Browse files
committed
add regression test for miri issue 2433
1 parent 8ab71ab commit 7927f09

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
trait T { type Item; }
4+
5+
type Alias<'a> = impl T<Item = &'a ()>;
6+
7+
struct S;
8+
impl<'a> T for &'a S {
9+
type Item = &'a ();
10+
}
11+
12+
fn filter_positive<'a>() -> Alias<'a> {
13+
&S
14+
}
15+
16+
fn with_positive(fun: impl Fn(Alias<'_>)) {
17+
fun(filter_positive());
18+
}
19+
20+
fn main() {
21+
with_positive(|_| ());
22+
}

0 commit comments

Comments
 (0)