blob: aff750dc62ea3e1fdf590622720adf58aa693a01 [file] [log] [blame]
//@ check-pass
// This test checks that we look at consider the super traits of trait objects
// when deducing closure signatures.
trait Foo: Fn(Bar) {}
impl<T> Foo for T where T: Fn(Bar) {}
struct Bar;
impl Bar {
fn bar(&self) {}
}
fn main() {
let x: &dyn Foo = &|x| {
x.bar();
};
}