rust/tests/ui/closures/issue-46742.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
214 B
Rust
Raw Normal View History

//@ check-pass
fn main() {
let _: i32 = (match "" {
"+" => ::std::ops::Add::add,
"-" => ::std::ops::Sub::sub,
"<" => |a,b| (a < b) as i32,
_ => unimplemented!(),
})(5, 5);
}