]> git.lizzy.rs Git - rust.git/blob - tests/ui/try-block/try-block-in-while.stderr
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / ui / try-block / try-block-in-while.stderr
1 error[E0277]: a `try` block must return `Result` or `Option` (or another type that implements `Try`)
2   --> $DIR/try-block-in-while.rs:6:17
3    |
4 LL |     while try { false } {}
5    |                 ^^^^^ could not wrap the final value of the block as `bool` doesn't implement `Try`
6    |
7    = help: the trait `Try` is not implemented for `bool`
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0277`.