rust-analyzer
rust-analyzer copied to clipboard
The derivation of the `never` type in JoinHandle failed
rust-analyzer version: rust-analyzer 1.76.0 (07dca48 2024-02-04) and rust-analyzer 1.78.0-nightly (bccb9bb 2024-02-16)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04) and rustc 1.78.0-nightly (bccb9bbb4 2024-02-16)
relevant settings: NONE
example
fn main() {
use std::thread::spawn;
fn foo() -> ! {
panic!()
}
// ra: h: JoinHandle<{unknown}>
// expected: h: JoinHandle<!>
let h = spawn(|| {
foo()
});
let _ = dbg!(h.join()); // Err(..)
}