1 error[E0308]: mismatched types
2 --> $DIR/coercions.rs:23:5
4 LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
5 | - expected `A` because of return type
7 | ^ expected struct `A`, found enum `UninhabitedEnum`
9 error[E0308]: mismatched types
10 --> $DIR/coercions.rs:27:5
12 LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
13 | - expected `A` because of return type
15 | ^ expected struct `A`, found struct `UninhabitedTupleStruct`
17 error[E0308]: mismatched types
18 --> $DIR/coercions.rs:31:5
20 LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
21 | - expected `A` because of return type
23 | ^ expected struct `A`, found struct `UninhabitedStruct`
25 error[E0308]: mismatched types
26 --> $DIR/coercions.rs:35:5
28 LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
29 | - expected `A` because of return type
31 | ^ expected struct `A`, found enum `UninhabitedVariants`
33 error: aborting due to 4 previous errors
35 For more information about this error, try `rustc --explain E0308`.