]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closures-simple.rs
diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-simple.rs
1 // run-pass
2 #![allow(unused_mut)]
3 #![allow(unused_imports)]
4 use std::ops::FnMut;
5
6 pub fn main() {
7     let mut f = |x: isize, y: isize| -> isize { x + y };
8     let z = f(1, 2);
9     assert_eq!(z, 3);
10 }