mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
11 lines
201 B
Rust
11 lines
201 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);
|
|
}
|