rust/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
199 B
Rust
Raw Normal View History

// check-pass
trait MyCmp {
fn cmp(&self) {}
}
impl MyCmp for f32 {}
fn main() {
// Ensure that `impl<F: FnPtr> Ord for F` is never considered for int and float infer vars.
0.0.cmp();
}