fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB35 linesraw
1error[E0308]: mismatched types
2  --> $DIR/coercions_same_crate.rs:30:5
3   |
4LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
5   |                                                                - expected `A` because of return type
6LL |     x
7   |     ^ expected `A`, found `UninhabitedEnum`
8
9error[E0308]: mismatched types
10  --> $DIR/coercions_same_crate.rs:34:5
11   |
12LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
13   |                                                                               - expected `A` because of return type
14LL |     x
15   |     ^ expected `A`, found `UninhabitedTupleStruct`
16
17error[E0308]: mismatched types
18  --> $DIR/coercions_same_crate.rs:38:5
19   |
20LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
21   |                                                                    - expected `A` because of return type
22LL |     x
23   |     ^ expected `A`, found `UninhabitedStruct`
24
25error[E0308]: mismatched types
26  --> $DIR/coercions_same_crate.rs:42:5
27   |
28LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
29   |                                                                                  - expected `A` because of return type
30LL |     x
31   |     ^ expected `A`, found `UninhabitedVariants`
32
33error: aborting due to 4 previous errors
34
35For more information about this error, try `rustc --explain E0308`.