rust/src/test/run-pass/issue-898.rs

12 lines
164 B
Rust

fn even(&&e: int) -> bool {
e % 2 == 0
}
fn log_if<T>(c: native fn(T)->bool, e: T) {
if c(e) { log(debug, e); }
}
fn main() {
(log_if(even, _))(2);
}