1 error[E0308]: mismatched types
2 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:5:5
4 LL | fn foo() -> impl std::fmt::Display {
5 | ---------------------- expected because this return type...
8 | ---- ...is found to be `i32` here
11 | ^^^^ expected i32, found u32
13 = note: expected type `i32`
16 error[E0308]: mismatched types
17 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:13:16
19 LL | fn bar() -> impl std::fmt::Display {
20 | ---------------------- expected because this return type...
23 | ---- ...is found to be `i32` here
26 | ^^^^ expected i32, found u32
28 = note: expected type `i32`
31 error[E0308]: mismatched types
32 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:22:9
34 LL | fn baz() -> impl std::fmt::Display {
35 | ---------------------- expected because this return type...
38 | ---- ...is found to be `i32` here
41 | ^^^^ expected i32, found u32
43 = note: expected type `i32`
46 error[E0308]: if and else have incompatible types
47 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:31:9
51 | | ---- expected because of this
54 | | ^^^^ expected i32, found u32
57 | |_____- if and else have incompatible types
59 = note: expected type `i32`
62 error[E0308]: mismatched types
63 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:39:14
65 LL | fn bat() -> impl std::fmt::Display {
66 | ---------------------- expected because this return type...
68 LL | 0 => return 0i32,
69 | ---- ...is found to be `i32` here
71 | ^^^^ expected i32, found u32
73 = note: expected type `i32`
76 error[E0308]: mismatched types
77 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:45:5
79 LL | fn can() -> impl std::fmt::Display {
80 | ---------------------- expected because this return type...
83 LL | | 0 => return 0i32,
84 | | ---- ...is found to be `i32` here
88 | |_____^ expected i32, found u32
90 = note: expected type `i32`
93 error[E0308]: mismatched types
94 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:59:13
96 LL | fn cat() -> impl std::fmt::Display {
97 | ---------------------- expected because this return type...
100 | ---- ...is found to be `i32` here
103 | ^^^^ expected i32, found u32
105 = note: expected type `i32`
108 error: aborting due to 7 previous errors
110 For more information about this error, try `rustc --explain E0308`.