Skip to content

Commit ae30782

Browse files
committed
Add issue-80956
rust-lang/rust#80956
1 parent ae18bb1 commit ae30782

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ices/80956.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pub trait Bar {
2+
type Type;
3+
}
4+
pub struct Foo<'a>(&'a ());
5+
impl<'a> Bar for Foo<'a> {
6+
type Type = ();
7+
}
8+
9+
pub fn func<'a>(_: <Foo<'a> as Bar>::Type) {}
10+
pub fn assert_is_func<A>(_: fn(A)) {}
11+
12+
pub fn test()
13+
where
14+
for<'a> <Foo<'a> as Bar>::Type: Sized,
15+
{
16+
assert_is_func(func);
17+
}
18+
19+
fn main() {}

0 commit comments

Comments
 (0)