diff options
Diffstat (limited to 'tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs')
| -rw-r--r-- | tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs new file mode 100644 index 00000000000..7289d9322d0 --- /dev/null +++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.rs @@ -0,0 +1,8 @@ +#![feature(unboxed_closures, tuple_trait)] + +fn to_fn_mut<A:std::marker::Tuple,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 +} |
