Ok, this is not syntactically correct, but compiler should not panick Using rustc 1.0.0-nightly (522d09dfe 2015-02-19) (built 2015-02-19) use std::old_io; fn main() { let s = old_io::stdin().read_line().ok().expect(""); if let Result<n2,_> = s.trim().parse() {}; }