summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs')
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs
new file mode 100644
index 000000000..0e727b11c
--- /dev/null
+++ b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs
@@ -0,0 +1,8 @@
+#![feature(unboxed_closures)]
+
+fn to_fn_mut<A,F:FnMut<A>>(f: F) -> F { f }
+
+fn main() {
+ let mut_ = to_fn_mut(|x| x);
+ mut_.call((0, )); //~ ERROR no method named `call` found
+}