summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-72590-type-error-sized.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-72590-type-error-sized.rs')
-rw-r--r--tests/ui/async-await/issue-72590-type-error-sized.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-72590-type-error-sized.rs b/tests/ui/async-await/issue-72590-type-error-sized.rs
new file mode 100644
index 000000000..00e098d43
--- /dev/null
+++ b/tests/ui/async-await/issue-72590-type-error-sized.rs
@@ -0,0 +1,22 @@
+// Regression test for issue #72590
+// Tests that we don't emit a spurious "size cannot be statically determined" error
+// edition:2018
+
+struct Foo {
+ foo: Nonexistent, //~ ERROR cannot find
+ other: str
+}
+
+struct Bar {
+ test: Missing //~ ERROR cannot find
+}
+
+impl Foo {
+ async fn frob(self) {} //~ ERROR the size
+}
+
+impl Bar {
+ async fn myfn(self) {}
+}
+
+fn main() {}