It's definitely not a big deal. But I want to understand this. I thought placing #[allow(unreachable_code)]
would stop the warning
26 | println!("after exit");
| ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
|
= note: `#[warn(unreachable_code)]` on by default
The lines in the code are
std::process::exit(0);
#[allow(unreachable_code)]
println!("after exit");
My understanding was that if I placed allow unreachable_code above some lines of code the unreachable code warning for those lines would be suppressed. Can anyone please help me understand this? thanks,