error: incorrect close delimiter: `}` --> $DIR/token-error-correct-3.rs:19:9 | LL | if !is_directory(path.as_ref()) { | - close delimiter possibly meant for this LL | //~^ ERROR cannot find function `is_directory` LL | callback(path.as_ref(); | - un-closed delimiter ... LL | } else { | ^ incorrect close delimiter error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` --> $DIR/token-error-correct-3.rs:15:35 | LL | callback(path.as_ref(); | ^ expected one of `)`, `,`, `.`, `?`, or an operator here 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[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/token-error-correct-3.rs:15:13 | LL | / callback(path.as_ref(); LL | | //~^ ERROR expected one of LL | | //~| ERROR this function takes 1 parameter but 2 parameters were supplied LL | | fs::create_dir_all(path.as_ref()).map(|()| true) LL | | } else { | |_________^ expected 1 parameter error: aborting due to 4 previous errors Some errors occurred: E0057, E0425. For more information about an error, try `rustc --explain E0057`.