Skip to content

Commit

Permalink
Add issue-80956
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jan 15, 2021
1 parent f9f1558 commit 8f5d6e9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ices/80956.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pub trait Bar {
type Type;
}
pub struct Foo<'a>(&'a ());
impl<'a> Bar for Foo<'a> {
type Type = ();
}

pub fn func<'a>(_: <Foo<'a> as Bar>::Type) {}
pub fn assert_is_func<A>(_: fn(A)) {}

pub fn test()
where
for<'a> <Foo<'a> as Bar>::Type: Sized,
{
assert_is_func(func);
}

fn main() {}

0 comments on commit 8f5d6e9

Please sign in to comment.