Skip to content

Support throwing closures #64

@Nemo157

Description

@Nemo157
#![feature(stmt_expr_attributes, proc_macro_hygiene)]

type Error = usize;

fn main() {
    let x = #[fehler::throws] || 5;
    
    dbg!(x());
}

I expected this to work and print Ok(5), with an expansion something like

    let x = || Result<_, Error> { Ok({ 5 }) };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions