]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-91450-inner-ty-error.stderr
Rollup merge of #93755 - ChayimFriedman2:allow-comparing-vecs-with-different-allocato...
[rust.git] / src / test / ui / typeck / issue-91450-inner-ty-error.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-91450-inner-ty-error.rs:4:13
3    |
4 LL | fn foo() -> Option<_> {}
5    |    ---      ^^^^^^^^^ expected enum `Option`, found `()`
6    |    |
7    |    implicitly returns `()` as its body has no tail or `return` expression
8    |
9    = note:   expected enum `Option<_>`
10            found unit type `()`
11
12 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
13   --> $DIR/issue-91450-inner-ty-error.rs:4:20
14    |
15 LL | fn foo() -> Option<_> {}
16    |                    ^ not allowed in type signatures
17
18 error: aborting due to 2 previous errors
19
20 Some errors have detailed explanations: E0121, E0308.
21 For more information about an error, try `rustc --explain E0121`.