summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-84128.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/closures/issue-84128.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/closures/issue-84128.rs b/src/test/ui/closures/issue-84128.rs
new file mode 100644
index 000000000..f81d7cfaa
--- /dev/null
+++ b/src/test/ui/closures/issue-84128.rs
@@ -0,0 +1,16 @@
+// test for issue 84128
+// missing suggestion for similar ADT type with diffetent generic paramenter
+// on closure ReturnNoExpression
+
+struct Foo<T>(T);
+
+fn main() {
+ || {
+ if false {
+ return Foo(0);
+ }
+
+ Foo(())
+ //~^ ERROR mismatched types [E0308]
+ };
+}