Now it complains if you have a function that produces error with Infallible value in Result (think exec or similar call that won't return if succeeds, but will return error if fails. I'm trying to use unwrap() to cause panic
use std::convert::Infallible;
pub fn dummy() -> Result<Infallible, &'static str> {
Err("nope")
}
pub fn complains() {
// note: this expression has type `Infallible`, which is uninhabited
dummy().unwrap();
}
pub fn also_complains() {
// = note: this `Result` may be an `Err` variant, which should be handled
dummy();
}
It seems they added a panic! for last without documenting it, or am I missing it? (count does document the panic! in Iterator: Iterator in std::iter - Rust)
1.0 and 1.2 were released on Fridays; every other release has been on the Thursday fixed by the six week cadence. It's certainly possible, but more likely that we'd get a quick point release imo