fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0308]: mismatched types 2 --> $DIR/coercions.rs:23:5 3 | 4LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { 5 | - expected `A` because of return type 6LL | x 7 | ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum` 8 | 9 = note: expected type `A` 10 found type `uninhabited::UninhabitedEnum` 11 12error[E0308]: mismatched types 13 --> $DIR/coercions.rs:27:5 14 | 15LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { 16 | - expected `A` because of return type 17LL | x 18 | ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct` 19 | 20 = note: expected type `A` 21 found type `uninhabited::UninhabitedTupleStruct` 22 23error[E0308]: mismatched types 24 --> $DIR/coercions.rs:31:5 25 | 26LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { 27 | - expected `A` because of return type 28LL | x 29 | ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct` 30 | 31 = note: expected type `A` 32 found type `uninhabited::UninhabitedStruct` 33 34error[E0308]: mismatched types 35 --> $DIR/coercions.rs:35:5 36 | 37LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { 38 | - expected `A` because of return type 39LL | x 40 | ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants` 41 | 42 = note: expected type `A` 43 found type `uninhabited::UninhabitedVariants` 44 45error: aborting due to 4 previous errors 46 47For more information about this error, try `rustc --explain E0308`.