blob: 778b13f24cf5667b82e8e1d0bcbd0aa22c362002 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
error[E0308]: mismatched types
--> $DIR/fully-qualified-type-name4.rs:6:12
|
LL | fn bar(x: usize) -> Option<usize> {
| ------------- expected `Option<usize>` because of return type
LL | return x;
| ^ expected enum `Option`, found `usize`
|
= note: expected enum `Option<usize>`
found type `usize`
help: try wrapping the expression in `Some`
|
LL | return Some(x);
| +++++ +
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
|