summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/future-contains-err-issue-115188.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/future-contains-err-issue-115188.rs')
-rw-r--r--tests/ui/async-await/future-contains-err-issue-115188.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/async-await/future-contains-err-issue-115188.rs b/tests/ui/async-await/future-contains-err-issue-115188.rs
new file mode 100644
index 000000000..bf643c926
--- /dev/null
+++ b/tests/ui/async-await/future-contains-err-issue-115188.rs
@@ -0,0 +1,17 @@
+// edition: 2021
+
+// Makes sure we don't spew a bunch of unrelated opaque errors when the reason
+// for this error is just a missing struct field in `foo`.
+
+async fn foo() {
+ let y = Wrapper { };
+ //~^ ERROR missing field `t` in initializer of `Wrapper<_>`
+}
+
+struct Wrapper<T> { t: T }
+
+fn is_send<T: Send>(_: T) {}
+
+fn main() {
+ is_send(foo());
+}