]> git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / rfc-2008-non-exhaustive / uninhabited / coercions.stderr
1 error[E0308]: mismatched types
2 --> $DIR/coercions.rs:23:5
3 |
4 LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
5 | - expected `A` because of return type
6 LL | x
7 | ^ expected struct `A`, found enum `UninhabitedEnum`
8
9 error[E0308]: mismatched types
10 --> $DIR/coercions.rs:27:5
11 |
12 LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
13 | - expected `A` because of return type
14 LL | x
15 | ^ expected struct `A`, found struct `UninhabitedTupleStruct`
16
17 error[E0308]: mismatched types
18 --> $DIR/coercions.rs:31:5
19 |
20 LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
21 | - expected `A` because of return type
22 LL | x
23 | ^ expected struct `A`, found struct `UninhabitedStruct`
24
25 error[E0308]: mismatched types
26 --> $DIR/coercions.rs:35:5
27 |
28 LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
29 | - expected `A` because of return type
30 LL | x
31 | ^ expected struct `A`, found enum `UninhabitedVariants`
32
33 error: aborting due to 4 previous errors
34
35 For more information about this error, try `rustc --explain E0308`.