summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures/unboxed-closures-simple.rs
blob: 1449554024ca10c0d8063ea105d9ce677fa91fa9 (plain)
1
2
3
4
5
6
7
8
9
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);
}