| error[E0308]: mismatched types |
| --> $DIR/coercions.rs:22:5 |
| | |
| LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { |
| | - expected `A` because of return type |
| LL | x |
| | ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum` |
| |
| error[E0308]: mismatched types |
| --> $DIR/coercions.rs:26:5 |
| | |
| LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { |
| | - expected `A` because of return type |
| LL | x |
| | ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct` |
| |
| error[E0308]: mismatched types |
| --> $DIR/coercions.rs:30:5 |
| | |
| LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { |
| | - expected `A` because of return type |
| LL | x |
| | ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct` |
| |
| error[E0308]: mismatched types |
| --> $DIR/coercions.rs:34:5 |
| | |
| LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { |
| | - expected `A` because of return type |
| LL | x |
| | ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants` |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0308`. |