]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-46112.stderr
Auto merge of #99028 - tmiasko:inline, r=estebank
[rust.git] / src / test / ui / typeck / issue-46112.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-46112.rs:9:21
3    |
4 LL | fn main() { test(Ok(())); }
5    |                  -- ^^ expected enum `Option`, found `()`
6    |                  |
7    |                  arguments to this enum variant are incorrect
8    |
9    = note:   expected enum `Option<()>`
10            found unit type `()`
11 note: tuple variant defined here
12   --> $SRC_DIR/core/src/result.rs:LL:COL
13    |
14 LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
15    |     ^^
16 help: try wrapping the expression in `Some`
17    |
18 LL | fn main() { test(Ok(Some(()))); }
19    |                     +++++  +
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.