]> git.lizzy.rs Git - rust.git/blob - tests/ui/let-else/issue-94176.stderr
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / let-else / issue-94176.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-94176.rs:5:32
3    |
4 LL | pub fn test(a: Option<u32>) -> Option<u32> {
5    |        ----                    ^^^^^^^^^^^ expected enum `Option`, found `()`
6    |        |
7    |        implicitly returns `()` as its body has no tail or `return` expression
8    |
9    = note:   expected enum `Option<u32>`
10            found unit type `()`
11 help: consider returning the local binding `a`
12    |
13 LL ~     println!("Foo");
14 LL +     a
15    |
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.