about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-28 09:54:44 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-28 09:54:44 +0000
commitc86974d94f918578b3a2a0b6b858e97be611c0f7 (patch)
tree9e35644f12d590c72be90147acda71a924bb2d38
parentef324565d071c6d7e2477a195648549e33d6a465 (diff)
downloadrust-c86974d94f918578b3a2a0b6b858e97be611c0f7.tar.gz
rust-c86974d94f918578b3a2a0b6b858e97be611c0f7.zip
test that fudging with opaque types is the same in the new solver
-rw-r--r--tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr (renamed from tests/ui/impl-trait/hidden-type-is-opaque-2.stderr)4
-rw-r--r--tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr31
-rw-r--r--tests/ui/impl-trait/hidden-type-is-opaque-2.rs2
3 files changed, 35 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/hidden-type-is-opaque-2.stderr b/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
index 39bf2214232..01c5a553dc5 100644
--- a/tests/ui/impl-trait/hidden-type-is-opaque-2.stderr
+++ b/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/hidden-type-is-opaque-2.rs:8:17
+  --> $DIR/hidden-type-is-opaque-2.rs:10:17
    |
 LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
@@ -13,7 +13,7 @@ LL |     Thunk::new(|mut cont: /* Type */| {
    |                         ++++++++++++
 
 error[E0282]: type annotations needed
-  --> $DIR/hidden-type-is-opaque-2.rs:18:17
+  --> $DIR/hidden-type-is-opaque-2.rs:20:17
    |
 LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
diff --git a/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr b/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr
new file mode 100644
index 00000000000..01c5a553dc5
--- /dev/null
+++ b/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr
@@ -0,0 +1,31 @@
+error[E0282]: type annotations needed
+  --> $DIR/hidden-type-is-opaque-2.rs:10:17
+   |
+LL |     Thunk::new(|mut cont| {
+   |                 ^^^^^^^^
+LL |
+LL |         cont.reify_as();
+   |         ---- type must be known at this point
+   |
+help: consider giving this closure parameter an explicit type
+   |
+LL |     Thunk::new(|mut cont: /* Type */| {
+   |                         ++++++++++++
+
+error[E0282]: type annotations needed
+  --> $DIR/hidden-type-is-opaque-2.rs:20:17
+   |
+LL |     Thunk::new(|mut cont| {
+   |                 ^^^^^^^^
+LL |
+LL |         cont.reify_as();
+   |         ---- type must be known at this point
+   |
+help: consider giving this closure parameter an explicit type
+   |
+LL |     Thunk::new(|mut cont: /* Type */| {
+   |                         ++++++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/hidden-type-is-opaque-2.rs b/tests/ui/impl-trait/hidden-type-is-opaque-2.rs
index 212e7b10802..78ac8363ba9 100644
--- a/tests/ui/impl-trait/hidden-type-is-opaque-2.rs
+++ b/tests/ui/impl-trait/hidden-type-is-opaque-2.rs
@@ -1,6 +1,8 @@
 // This doesn't work, because we don't flow information from opaque types
 // into function arguments via the function's generic parameters
 // FIXME(oli-obk): make `expected_inputs_for_expected_output` support this
+//@ revisions: default next
+//@[next] compile-flags: -Znext-solver
 
 #![feature(type_alias_impl_trait)]