summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/proper-span-for-type-error.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/async-await/proper-span-for-type-error.fixed')
-rw-r--r--src/test/ui/async-await/proper-span-for-type-error.fixed12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/async-await/proper-span-for-type-error.fixed b/src/test/ui/async-await/proper-span-for-type-error.fixed
new file mode 100644
index 000000000..7d43b575d
--- /dev/null
+++ b/src/test/ui/async-await/proper-span-for-type-error.fixed
@@ -0,0 +1,12 @@
+// edition:2021
+// run-rustfix
+#![allow(dead_code)]
+
+async fn a() {}
+
+async fn foo() -> Result<(), i32> {
+ a().await;
+ Ok(()) //~ ERROR mismatched types
+}
+
+fn main() {}