Skip to content

proc and closure expressions do not accept ! as a return type #13490

Closed
@ftxqxd

Description

@ftxqxd

Example:

fn main() {
    // This is fine
    let x: proc() -> ! = proc() { loop {} }
    // error: expected type, found token NOT
    let y = proc() -> ! { loop {} }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-grammarArea: The grammar of Rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions