Open
Description
#![feature(never_type)]
fn will_not_fail() -> Result<i32, !> {
Ok(5)
}
pub fn main() {
will_not_fail();
}
This code yields a warning:
warning: unused `std::result::Result` that must be used
--> main.rs:8:5
|
8 | will_not_fail();
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: this `Result` may be an `Err` variant, which should be handled
However since a Result<T, !>
can never have the Err
branch, having to handle the resulting error seems kind of pointless. Would it be possible to disable the unused_must_use
lint for this particular case?