1 // Regression test for #59311. The test is taken from
2 // rust-lang/rust/issues/71546#issuecomment-620638437
3 // as they seem to have the same cause.
5 // FIXME: It's not clear that this code ought to report
6 // an error, but the regression test is here to ensure
7 // that it does not ICE. See discussion on #74889 for details.
10 fn t<F: Fn()>(&self, _: F) {}
13 pub fn crash<V>(v: &V)
15 for<'a> &'a V: T + 'static,
17 v.t(|| {}); //~ ERROR: higher-ranked subtype error