@@ -2,10 +2,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
22 --> $DIR/try-operator-on-main.rs:19:5
33 |
4419 | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
5- | ---------------------------
6- | |
7- | cannot use the `?` operator in a function that returns `()`
8- | in this macro invocation
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
96 |
107 = help: the trait `std::ops::Try` is not implemented for `()`
118 = note: required by `std::ops::Try::from_error`
@@ -14,10 +11,7 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
1411 --> $DIR/try-operator-on-main.rs:22:5
1512 |
161322 | ()?; //~ ERROR the `?` operator can only
17- | ---
18- | |
19- | the `?` operator cannot be applied to type `()`
20- | in this macro invocation
14+ | ^^^ the `?` operator cannot be applied to type `()`
2115 |
2216 = help: the trait `std::ops::Try` is not implemented for `()`
2317 = note: required by `std::ops::Try::into_result`
@@ -38,10 +32,7 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
3832 --> $DIR/try-operator-on-main.rs:32:5
3933 |
403432 | ()?; //~ ERROR the `?` operator can only
41- | ---
42- | |
43- | the `?` operator cannot be applied to type `()`
44- | in this macro invocation
35+ | ^^^ the `?` operator cannot be applied to type `()`
4536 |
4637 = help: the trait `std::ops::Try` is not implemented for `()`
4738 = note: required by `std::ops::Try::into_result`
0 commit comments