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