We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b61431 commit 4af7cf3Copy full SHA for 4af7cf3
src/test/ui/try-block/try-block-catch.rs
@@ -5,5 +5,6 @@
5
fn main() {
6
let res: Option<bool> = try {
7
true
8
- } catch { }; //~ ERROR `try {} catch` is not a valid syntax
+ } catch { };
9
+ //~^ ERROR `try {} catch` is not a valid syntax
10
}
src/test/ui/try-block/try-block-catch.stderr
@@ -1,7 +1,7 @@
1
error: `try {} catch` is not a valid syntax
2
--> $DIR/try-block-catch.rs:8:7
3
|
4
-LL | } catch { }; //~ ERROR `try {} catch` is not a valid syntax
+LL | } catch { };
| ^^^^^
= help: try using `match` on the result of the `try` block instead
0 commit comments