test that fudging with opaque types is the same in the new solver

This commit is contained in:
Oli Scherer 2024-02-28 09:54:44 +00:00
parent ef324565d0
commit c86974d94f
3 changed files with 35 additions and 2 deletions

View File

@ -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| {
| ^^^^^^^^

View File

@ -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`.

View File

@ -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)]