about summary refs log tree commit diff
path: root/tests/crashes/124440.rs
blob: 431c4e444f10a697dab97b42f353f2e7c7b695d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@ known-bug: rust-lang/rust#124440

#![allow(warnings)]

trait Foo {}

impl<F> Foo for F where F: FnMut(&()) {}

struct Bar<F> {
    f: F,
}

impl<F> Foo for Bar<F> where F: Foo {}

fn assert_foo<F>(_: F)
where
    Bar<F>: Foo,
{
}

fn main() {
    assert_foo(|_| ());
}