summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/return-closures.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/return-closures.rs')
-rw-r--r--src/test/ui/suggestions/return-closures.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/return-closures.rs b/src/test/ui/suggestions/return-closures.rs
new file mode 100644
index 000000000..86c7c1537
--- /dev/null
+++ b/src/test/ui/suggestions/return-closures.rs
@@ -0,0 +1,13 @@
+fn foo() {
+ //~^ HELP try adding a return type
+ |x: &i32| 1i32
+ //~^ ERROR mismatched types
+}
+
+fn bar(i: impl Sized) {
+ //~^ HELP a return type might be missing here
+ || i
+ //~^ ERROR mismatched types
+}
+
+fn main() {}