]> git.lizzy.rs Git - rust.git/blob - tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr
Rollup merge of #107780 - compiler-errors:instantiate-binder, r=lcnr
[rust.git] / tests / ui / fully-qualified-type / fully-qualified-type-name4.stderr
1 error[E0308]: mismatched types
2   --> $DIR/fully-qualified-type-name4.rs:6:12
3    |
4 LL | fn bar(x: usize) -> Option<usize> {
5    |                     ------------- expected `Option<usize>` because of return type
6 LL |     return x;
7    |            ^ expected `Option<usize>`, found `usize`
8    |
9    = note: expected enum `Option<usize>`
10               found type `usize`
11 help: try wrapping the expression in `Some`
12    |
13 LL |     return Some(x);
14    |            +++++ +
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.