2019-05-04 05:03:06 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-10-12 20:17:00 -05:00
|
|
|
--> $DIR/coercions_same_crate.rs:28:5
|
2019-05-03 19:15:26 -05:00
|
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
|
|
|
|
| - expected `A` because of return type
|
|
|
|
LL | x
|
|
|
|
| ^ expected struct `A`, found enum `UninhabitedEnum`
|
2019-05-03 19:15:26 -05:00
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-10-12 20:17:00 -05:00
|
|
|
--> $DIR/coercions_same_crate.rs:32:5
|
2019-05-03 19:15:26 -05:00
|
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
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 `UninhabitedTupleStruct`
|
2019-05-03 19:15:26 -05:00
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-10-12 20:17:00 -05:00
|
|
|
--> $DIR/coercions_same_crate.rs:36:5
|
2019-05-03 19:15:26 -05:00
|
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
|
|
|
|
| - expected `A` because of return type
|
|
|
|
LL | x
|
|
|
|
| ^ expected struct `A`, found struct `UninhabitedStruct`
|
2019-05-03 19:15:26 -05:00
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-10-12 20:17:00 -05:00
|
|
|
--> $DIR/coercions_same_crate.rs:40:5
|
2019-05-04 05:03:06 -05:00
|
|
|
|
|
|
|
|
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 `UninhabitedVariants`
|
2019-05-03 19:15:26 -05:00
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2019-05-03 19:15:26 -05:00
|
|
|
|
2019-05-04 05:03:06 -05:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|