blob: 1e9942d42e86720ebd6b128a43e5b261dc51452b [file] [log] [blame]
struct S<T>(T);
impl<T> S<T> {
fn new() -> Self {
loop {}
}
fn constrain<F: Fn() -> T>(&self, _f: F) {}
}
fn main() {
let s = S::new();
let c = || true;
s.constrain(c);
let _: S<usize> = s;
//~^ ERROR mismatched types
}