error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` --> $DIR/token-error-correct-3.rs:15:35 | LL | callback(path.as_ref(); | - ^ help: `)` may belong here | | | unclosed delimiter error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:19:9 | LL | fs::create_dir_all(path.as_ref()).map(|()| true) | - expected one of `.`, `;`, `?`, `}`, or an operator here LL | LL | } else { | ^ unexpected token error[E0425]: cannot find function `is_directory` in this scope --> $DIR/token-error-correct-3.rs:13:13 | LL | if !is_directory(path.as_ref()) { | ^^^^^^^^^^^^ not found in this scope error[E0308]: mismatched types --> $DIR/token-error-correct-3.rs:17:13 | LL | fs::create_dir_all(path.as_ref()).map(|()| true) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found enum `std::result::Result` | = note: expected type `()` found type `std::result::Result` error: aborting due to 4 previous errors Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`.