“the trait bound `!: FromStr` is not satisfied” how should I fix it?

Hello, I'm new to rust, so I don't understand some things.
If you have time to explain the fix and help me to do it: thank you!

#[allow(unused_imports)]
use owo_colors::OwoColorize;

mod display;

macro_rules! error {
    ($($e:tt)*) => {
        eprintln!("{}: {}", "error".bold().red(), format!($($e)*));
    };
}

macro_rules! warn {
    ($($e:tt)*) => {
        eprintln!("{}: {}", "warning".bold().yellow(), format!($($e)*));
    };
}

macro_rules! exit {
    // rule one: does not specify the exit code
    () => {
        std::process::exit(0);
    };

    // rule two: specify the exit code
    ($ec:literal) => {
        if $ec == 1 {
            println!("{}: exiting with exit code 1", "warning".bold().yellow());
        }

        std::process::exit($ec);
    };
}

fn main() {
    let mut shell_arguments = pico_args::Arguments::from_env();

    let version = shell_arguments.contains(["-v", "--v"]);
    let help = shell_arguments.contains(["-h", "--help"]);

    if help {
        display::help::display();
        exit!();
    }

    if version {
        display::version::display();
        exit!();
    }

    let input = shell_arguments
        .value_from_str(["-i", "--input"])
        .unwrap_or_else(|e| {
            error!("missing input argument!");
            exit!(1);
        });

    todo!();
}

My guess at what is going on is that here:

    let input = shell_arguments
        .value_from_str(["-i", "--input"])
        .unwrap_or_else(|e| {
            error!("missing input argument!");
            exit!(1);
        });

input gets inferred to be ! due to the closure diverting (exiting), so you call value_from_str::<!> to try to parse a ! from the "--input" arg. (I'm guessing value_from_str takes a generic T: FromStr.)

If my guess is correct, a probable fix is to annotate the input type.

    let input: PathBuf = shell_arguments ...

If my guess is wrong, or if the annotation doesn't work, please post the full error from cargo build in a terminal.

It does work! Thank you so muchh