summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-46742.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/closures/issue-46742.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/closures/issue-46742.rs b/src/test/ui/closures/issue-46742.rs
new file mode 100644
index 000000000..cd8dc4869
--- /dev/null
+++ b/src/test/ui/closures/issue-46742.rs
@@ -0,0 +1,9 @@
+// check-pass
+fn main() {
+ let _: i32 = (match "" {
+ "+" => ::std::ops::Add::add,
+ "-" => ::std::ops::Sub::sub,
+ "<" => |a,b| (a < b) as i32,
+ _ => unimplemented!(),
+ })(5, 5);
+}