Closed
Description
rustc --explain E0102
Gives this example code to show the problem.
fn demo(devil: fn () -> !) {
let x: &_ = devil();
// error: cannot determine a type for this local variable
}
fn oh_no() -> ! { panic!("the devil is in the details") }
fn main() {
demo(oh_no);
}
This example does not return E0102, but E0282.
rustc --version --verbose
rustc 1.6.0 (c30b771ad 2016-01-19)
binary: rustc
commit-hash: c30b771ad9d44ab84f8c88b80c25fcfde2433126
commit-date: 2016-01-19
host: x86_64-unknown-linux-gnu
release: 1.6.0
Metadata
Metadata
Assignees
Labels
No labels