about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-10-18 10:37:28 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-10-26 15:26:08 -0700
commit55e4e2d52e563a02dc43804abdcc74b98976387b (patch)
treec7ab185adbcb3d1853bd35a7b7ee1d6650051a95
parent6206a5a1b42072dfad10f923c68c66e552aa1c49 (diff)
downloadrust-55e4e2d52e563a02dc43804abdcc74b98976387b.tar.gz
rust-55e4e2d52e563a02dc43804abdcc74b98976387b.zip
Remove unnecessary error in test
-rw-r--r--src/test/ui/suggestions/let-binding-init-expr-as-ty.rs3
-rw-r--r--src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr15
2 files changed, 4 insertions, 14 deletions
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 4b572d6255b..beea951a18a 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 b472c267987..f4b0a38a105 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: `<i32 as Trait>::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 4 previous errors
+error: aborting due to 3 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`.