@@ -59,6 +59,52 @@ LL | | }
5959 = note: expected type `i32`
6060 found type `u32`
6161
62- error: aborting due to 4 previous errors
62+ error[E0308]: mismatched types
63+ --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:39:14
64+ |
65+ LL | fn bat() -> impl std::fmt::Display {
66+ | ---------------------- expected because this return type...
67+ LL | match 13 {
68+ LL | 0 => return 0i32,
69+ | ---- ...is found to be `i32` here
70+ LL | _ => 1u32,
71+ | ^^^^ expected i32, found u32
72+ |
73+ = note: expected type `i32`
74+ found type `u32`
75+
76+ error[E0308]: mismatched types
77+ --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:45:5
78+ |
79+ LL | fn can() -> impl std::fmt::Display {
80+ | ---------------------- expected because this return type...
81+ LL | / match 13 {
82+ LL | |
83+ LL | | 0 => return 0i32,
84+ | | ---- ...is found to be `i32` here
85+ LL | | 1 => 1u32,
86+ LL | | _ => 2u32,
87+ LL | | }
88+ | |_____^ expected i32, found u32
89+ |
90+ = note: expected type `i32`
91+ found type `u32`
92+
93+ error[E0308]: mismatched types
94+ --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:59:13
95+ |
96+ LL | fn cat() -> impl std::fmt::Display {
97+ | ---------------------- expected because this return type...
98+ ...
99+ LL | return 0i32;
100+ | ---- ...is found to be `i32` here
101+ ...
102+ LL | 1u32
103+ | ^^^^ expected i32, found u32
104+ |
105+ = note: expected type `i32`
106+ found type `u32`
107+
108+ error: aborting due to 7 previous errors
63109
64110For more information about this error, try `rustc --explain E0308`.
0 commit comments