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 error[E0308]: mismatched types
14 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:13:16
16 LL | fn bar() -> impl std::fmt::Display {
17 | ---------------------- expected because this return type...
20 | ---- ...is found to be `i32` here
23 | ^^^^ expected `i32`, found `u32`
25 error[E0308]: mismatched types
26 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:22:9
28 LL | fn baz() -> impl std::fmt::Display {
29 | ---------------------- expected because this return type...
32 | ---- ...is found to be `i32` here
35 | ^^^^ expected `i32`, found `u32`
37 error[E0308]: `if` and `else` have incompatible types
38 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:31:9
42 | | ---- expected because of this
45 | | ^^^^ expected `i32`, found `u32`
48 | |_____- `if` and `else` have incompatible types
50 error[E0308]: mismatched types
51 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:39:14
53 LL | fn bat() -> impl std::fmt::Display {
54 | ---------------------- expected because this return type...
56 LL | 0 => return 0i32,
57 | ---- ...is found to be `i32` here
59 | ^^^^ expected `i32`, found `u32`
61 error[E0308]: mismatched types
62 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:45:5
64 LL | fn can() -> impl std::fmt::Display {
65 | ---------------------- expected because this return type...
68 LL | | 0 => return 0i32,
69 | | ---- ...is found to be `i32` here
73 | |_____^ expected `i32`, found `u32`
75 error[E0308]: mismatched types
76 --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:59:13
78 LL | fn cat() -> impl std::fmt::Display {
79 | ---------------------- expected because this return type...
82 | ---- ...is found to be `i32` here
85 | ^^^^ expected `i32`, found `u32`
87 error: aborting due to 7 previous errors
89 For more information about this error, try `rustc --explain E0308`.