]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs
Imported Upstream version 1.0.0~beta.3
[rustc.git] / src / test / run-pass / unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs
index 99e2149de966a3e759a19c2d31a75fcba12dc020..bdd1932182bdcbc19507fef7bbb25abacbe81854 100644 (file)
 
 // pretty-expanded FIXME #23616
 
-#![feature(unboxed_closures, core)]
+pub trait ToPrimitive {
+    fn to_int(&self) {}
+}
 
-use std::num::ToPrimitive;
+impl ToPrimitive for isize {}
+impl ToPrimitive for i32 {}
+impl ToPrimitive for usize {}
 
 fn doit<T,F>(val: T, f: &F)
     where F : Fn(&T)
 {
-    f.call((&val,))
+    f(&val)
 }
 
 pub fn main() {