Why does this code not compile?
use std::{fs, path::Path}; fn main() { let dir = Path::new(\"../FileSystem\"); if !dir.is_dir() { println!(
The ques_in_main RFC got merged recently. Once it's completed, the syntax in the question will indeed compile just fine and work as intended, provided the try!() calls are replaced with the ? operator.
try!()
?