Skip to content

Commit c86974d

Browse files
committed
test that fudging with opaque types is the same in the new solver
1 parent ef32456 commit c86974d

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

tests/ui/impl-trait/hidden-type-is-opaque-2.stderr renamed to tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0282]: type annotations needed
2-
--> $DIR/hidden-type-is-opaque-2.rs:8:17
2+
--> $DIR/hidden-type-is-opaque-2.rs:10:17
33
|
44
LL | Thunk::new(|mut cont| {
55
| ^^^^^^^^
@@ -13,7 +13,7 @@ LL | Thunk::new(|mut cont: /* Type */| {
1313
| ++++++++++++
1414

1515
error[E0282]: type annotations needed
16-
--> $DIR/hidden-type-is-opaque-2.rs:18:17
16+
--> $DIR/hidden-type-is-opaque-2.rs:20:17
1717
|
1818
LL | Thunk::new(|mut cont| {
1919
| ^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
error[E0282]: type annotations needed
2+
--> $DIR/hidden-type-is-opaque-2.rs:10:17
3+
|
4+
LL | Thunk::new(|mut cont| {
5+
| ^^^^^^^^
6+
LL |
7+
LL | cont.reify_as();
8+
| ---- type must be known at this point
9+
|
10+
help: consider giving this closure parameter an explicit type
11+
|
12+
LL | Thunk::new(|mut cont: /* Type */| {
13+
| ++++++++++++
14+
15+
error[E0282]: type annotations needed
16+
--> $DIR/hidden-type-is-opaque-2.rs:20:17
17+
|
18+
LL | Thunk::new(|mut cont| {
19+
| ^^^^^^^^
20+
LL |
21+
LL | cont.reify_as();
22+
| ---- type must be known at this point
23+
|
24+
help: consider giving this closure parameter an explicit type
25+
|
26+
LL | Thunk::new(|mut cont: /* Type */| {
27+
| ++++++++++++
28+
29+
error: aborting due to 2 previous errors
30+
31+
For more information about this error, try `rustc --explain E0282`.

tests/ui/impl-trait/hidden-type-is-opaque-2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// This doesn't work, because we don't flow information from opaque types
22
// into function arguments via the function's generic parameters
33
// FIXME(oli-obk): make `expected_inputs_for_expected_output` support this
4+
//@ revisions: default next
5+
//@[next] compile-flags: -Znext-solver
46

57
#![feature(type_alias_impl_trait)]
68

0 commit comments

Comments
 (0)