diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/return/return-type.stderr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr new file mode 100644 index 000000000..5af136e60 --- /dev/null +++ b/src/test/ui/return/return-type.stderr @@ -0,0 +1,20 @@ +error[E0308]: mismatched types + --> $DIR/return-type.rs:10:5 + | +LL | foo(4 as usize) + | ^^^^^^^^^^^^^^^ expected `()`, found struct `S` + | + = 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`. |