summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-73741-type-err.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-73741-type-err.rs')
-rw-r--r--tests/ui/async-await/issue-73741-type-err.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-73741-type-err.rs b/tests/ui/async-await/issue-73741-type-err.rs
new file mode 100644
index 000000000..c5b9e34ed
--- /dev/null
+++ b/tests/ui/async-await/issue-73741-type-err.rs
@@ -0,0 +1,14 @@
+// edition:2018
+//
+// Regression test for issue #73741
+// Ensures that we don't emit spurious errors when
+// a type error ocurrs in an `async fn`
+
+async fn weird() {
+ 1 = 2; //~ ERROR invalid left-hand side
+
+ let mut loop_count = 0;
+ async {}.await
+}
+
+fn main() {}