Remove unnecessary error in test

This commit is contained in:
Esteban Küber 2019-10-18 10:37:28 -07:00
parent 6206a5a1b4
commit 55e4e2d52e
2 changed files with 4 additions and 14 deletions

View file

@ -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() {

View file

@ -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 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`.