diff options
Diffstat (limited to 'tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs')
-rw-r--r-- | tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs new file mode 100644 index 000000000..9135c82b4 --- /dev/null +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs @@ -0,0 +1,8 @@ +// run-pass +#![feature(fn_traits)] + +fn main() { + let mut zero = || 0; + let x = zero.call_mut(()); + assert_eq!(x, 0); +} |