Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary error in test
  • Loading branch information
estebank committed Oct 26, 2019
commit 55e4e2d52e563a02dc43804abdcc74b98976387b
3 changes: 2 additions & 1 deletion src/test/ui/suggestions/let-binding-init-expr-as-ty.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
15 changes: 2 additions & 13 deletions src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.