Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E0102 explanantion has out of date / incorrect example. #33057

Closed
timothy-mcroy opened this issue Apr 17, 2016 · 1 comment
Closed

E0102 explanantion has out of date / incorrect example. #33057

timothy-mcroy opened this issue Apr 17, 2016 · 1 comment

Comments

@timothy-mcroy
Copy link

timothy-mcroy commented Apr 17, 2016

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
@GuillaumeGomez
Copy link
Member

cc @Manishearth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants