blob: 60d538eba882abcc143e5441e06a0b21b2e13dbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
error[E0308]: mismatched types
--> $DIR/return-type.rs:10:5
|
LL | foo(4 as usize)
| ^^^^^^^^^^^^^^^ expected `()`, found `S<usize>`
|
= note: expected unit type `()`
found struct `S<usize>`
help: consider using a semicolon here
|
LL | foo(4 as usize);
| +
help: try adding a return type
|
LL | fn bar() -> S<usize> {
| +++++++++++
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
|