Skip to content

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

@timothy-mcroy

Description

@timothy-mcroy

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions