diff --git a/src/test/ui/suggestions/let-binding-init-expr-as-ty.rs b/src/test/ui/suggestions/let-binding-init-expr-as-ty.rs index 4b572d6255bc..beea951a18a2 100644 --- a/src/test/ui/suggestions/let-binding-init-expr-as-ty.rs +++ b/src/test/ui/suggestions/let-binding-init-expr-as-ty.rs @@ -1,9 +1,10 @@ -pub fn foo(num: i32) -> i32 { //~ ERROR mismatched types +pub fn foo(num: i32) -> i32 { let foo: i32::from_be(num); //~^ ERROR expected type, found local variable `num` //~| ERROR parenthesized type parameters may only be used with a `Fn` trait //~| ERROR ambiguous associated type //~| WARNING this was previously accepted by the compiler but is being phased out + foo } fn main() { diff --git a/src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr b/src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr index b472c267987a..f4b0a38a105b 100644 --- a/src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr +++ b/src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr @@ -24,18 +24,7 @@ error[E0223]: ambiguous associated type LL | let foo: i32::from_be(num); | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::from_be` -error[E0308]: mismatched types - --> $DIR/let-binding-init-expr-as-ty.rs:1:25 - | -LL | pub fn foo(num: i32) -> i32 { - | --- ^^^ expected i32, found () - | | - | implicitly returns `()` as its body has no tail or `return` expression - | - = note: expected type `i32` - found type `()` +error: aborting due to 3 previous errors -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0223, E0308, E0573. +Some errors have detailed explanations: E0223, E0573. For more information about an error, try `rustc --explain E0223`.