Closed
Description
#85556 introduced an unreachable code warning after uninhabited expressions; unfortunately that warning fires even when no code follows the expression.
This makes it impossible to use patterns such as:
fn foo() -> Result<std::convert::Infallible, u64> {
Err(5)
}
fn main() {
match foo().expect("should") {}
}
where the match
is being used in the manner suggested by @nikomatsakis in a blog post.