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