Skip to content

Commit fa0b721

Browse files
committed
Remove unnecessary error in test
1 parent f293eb4 commit fa0b721

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/test/ui/suggestions/let-binding-init-expr-as-ty.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
pub fn foo(num: i32) -> i32 { //~ ERROR mismatched types
1+
pub fn foo(num: i32) -> i32 {
22
let foo: i32::from_be(num);
33
//~^ ERROR expected type, found local variable `num`
44
//~| ERROR parenthesized type parameters may only be used with a `Fn` trait
55
//~| ERROR ambiguous associated type
66
//~| WARNING this was previously accepted by the compiler but is being phased out
7+
foo
78
}
89

910
fn main() {

src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr

+2-13
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,7 @@ error[E0223]: ambiguous associated type
2424
LL | let foo: i32::from_be(num);
2525
| ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<i32 as Trait>::from_be`
2626

27-
error[E0308]: mismatched types
28-
--> $DIR/let-binding-init-expr-as-ty.rs:1:25
29-
|
30-
LL | pub fn foo(num: i32) -> i32 {
31-
| --- ^^^ expected i32, found ()
32-
| |
33-
| implicitly returns `()` as its body has no tail or `return` expression
34-
|
35-
= note: expected type `i32`
36-
found type `()`
37-
38-
error: aborting due to 4 previous errors
27+
error: aborting due to 3 previous errors
3928

40-
Some errors have detailed explanations: E0223, E0308, E0573.
29+
Some errors have detailed explanations: E0223, E0573.
4130
For more information about an error, try `rustc --explain E0223`.

0 commit comments

Comments
 (0)