rust/tests/ui/return/suggest-a-value.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
480 B
Plaintext
Raw Permalink Normal View History

2024-04-14 09:35:52 -04:00
error[E0069]: `return;` in a function whose return type is not `()`
--> $DIR/suggest-a-value.rs:2:5
|
LL | fn test() -> (i32,) {
| ------ expected `(i32,)` because of this return type
LL | return;
| ^^^^^^ return type is not `()`
|
help: give the `return` a value of the expected type
|
2024-04-14 09:41:16 -04:00
LL | return (42,);
| +++++
2024-04-14 09:35:52 -04:00
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0069`.