diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs index a27df240d079..95b40368143e 100644 --- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs +++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs @@ -26,10 +26,10 @@ fn baz() -> impl std::fmt::Display { fn qux() -> impl std::fmt::Display { if false { - //~^ ERROR if and else have incompatible types 0i32 } else { 1u32 + //~^ ERROR if and else have incompatible types } } diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr index be3d2c0db4ca..62da0787b02a 100644 --- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr +++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr @@ -38,15 +38,17 @@ LL | | } found type `u32` error[E0308]: if and else have incompatible types - --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:28:5 + --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:31:9 | LL | / if false { -LL | | //~^ ERROR if and else have incompatible types LL | | 0i32 + | | ---- expected because of this LL | | } else { LL | | 1u32 + | | ^^^^ expected i32, found u32 +LL | | //~^ ERROR if and else have incompatible types LL | | } - | |_____^ expected i32, found u32 + | |_____- if and else have incompatible types | = note: expected type `i32` found type `u32`