diff options
Diffstat (limited to 'tests/ui/unboxed-closures/unboxed-closures-simple.rs')
-rw-r--r-- | tests/ui/unboxed-closures/unboxed-closures-simple.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/unboxed-closures/unboxed-closures-simple.rs b/tests/ui/unboxed-closures/unboxed-closures-simple.rs new file mode 100644 index 000000000..144955402 --- /dev/null +++ b/tests/ui/unboxed-closures/unboxed-closures-simple.rs @@ -0,0 +1,10 @@ +// run-pass +#![allow(unused_mut)] +#![allow(unused_imports)] +use std::ops::FnMut; + +pub fn main() { + let mut f = |x: isize, y: isize| -> isize { x + y }; + let z = f(1, 2); + assert_eq!(z, 3); +} |