]> git.proxmox.com Git - rustc.git/blob - src/test/ui/return/return-type.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / return / return-type.stderr
1 error[E0308]: mismatched types
2 --> $DIR/return-type.rs:10:5
3 |
4 LL | foo(4 as usize)
5 | ^^^^^^^^^^^^^^^ expected `()`, found struct `S`
6 |
7 = note: expected unit type `()`
8 found struct `S<usize>`
9 help: consider using a semicolon here
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`.