summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/generator
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/generator')
-rw-r--r--tests/ui/generator/layout-error.rs1
-rw-r--r--tests/ui/generator/layout-error.stderr20
2 files changed, 20 insertions, 1 deletions
diff --git a/tests/ui/generator/layout-error.rs b/tests/ui/generator/layout-error.rs
index 7c3d18740..44cfc1d70 100644
--- a/tests/ui/generator/layout-error.rs
+++ b/tests/ui/generator/layout-error.rs
@@ -24,5 +24,6 @@ fn main() {
type F = impl Future;
// Check that statics are inhabited computes they layout.
static POOL: Task<F> = Task::new();
+ //~^ ERROR: cannot check whether the hidden type of `layout_error[b009]::main::F::{opaque#0}` satisfies auto traits
Task::spawn(&POOL, || cb());
}
diff --git a/tests/ui/generator/layout-error.stderr b/tests/ui/generator/layout-error.stderr
index b1a258f4f..ea3b25551 100644
--- a/tests/ui/generator/layout-error.stderr
+++ b/tests/ui/generator/layout-error.stderr
@@ -4,6 +4,24 @@ error[E0425]: cannot find value `Foo` in this scope
LL | let a = Foo;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: cannot check whether the hidden type of `layout_error[b009]::main::F::{opaque#0}` satisfies auto traits
+ --> $DIR/layout-error.rs:26:18
+ |
+LL | static POOL: Task<F> = Task::new();
+ | ^^^^^^^
+ |
+note: opaque type is declared here
+ --> $DIR/layout-error.rs:24:14
+ |
+LL | type F = impl Future;
+ | ^^^^^^^^^^^
+note: required because it appears within the type `Task<F>`
+ --> $DIR/layout-error.rs:9:12
+ |
+LL | pub struct Task<F: Future>(F);
+ | ^^^^
+ = note: shared static variables must have a type that implements `Sync`
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0425`.