]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-51632-try-desugar-incompatible-types.stderr
1 error[E0308]: `?` operator has incompatible types
2   --> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5
3    |
4 LL |     missing_discourses()?
5    |     ^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `isize`
6    |
7    = note: `?` operator cannot convert from `isize` to `Result<isize, ()>`
8    = note: expected enum `Result<isize, ()>`
9               found type `isize`
10 help: try removing this `?`
11    |
12 LL -     missing_discourses()?
13 LL +     missing_discourses()
14    |
15 help: try wrapping the expression in `Ok`
16    |
17 LL |     Ok(missing_discourses()?)
18    |     +++                     +
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0308`.