rust/tests/ui/unboxed-closures/unboxed-closures-simple.rs
2023-01-11 09:32:08 +00:00

11 lines
200 B
Rust

// 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);
}