1 error[E0308]: mismatched types
2 --> $DIR/coercions_same_crate.rs:30: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 = note: expected struct `A`
10 found enum `UninhabitedEnum`
12 error[E0308]: mismatched types
13 --> $DIR/coercions_same_crate.rs:34:5
15 LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
16 | - expected `A` because of return type
18 | ^ expected struct `A`, found struct `UninhabitedTupleStruct`
20 = note: expected struct `A`
21 found struct `UninhabitedTupleStruct`
23 error[E0308]: mismatched types
24 --> $DIR/coercions_same_crate.rs:38:5
26 LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
27 | - expected `A` because of return type
29 | ^ expected struct `A`, found struct `UninhabitedStruct`
31 = note: expected struct `A`
32 found struct `UninhabitedStruct`
34 error[E0308]: mismatched types
35 --> $DIR/coercions_same_crate.rs:42:5
37 LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
38 | - expected `A` because of return type
40 | ^ expected struct `A`, found enum `UninhabitedVariants`
42 = note: expected struct `A`
43 found enum `UninhabitedVariants`
45 error: aborting due to 4 previous errors
47 For more information about this error, try `rustc --explain E0308`.