@@ -2,10 +2,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
2
2
--> $DIR/try-operator-on-main.rs:19:5
3
3
|
4
4
19 | 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 `()`
9
6
|
10
7
= help: the trait `std::ops::Try` is not implemented for `()`
11
8
= 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
14
11
--> $DIR/try-operator-on-main.rs:22:5
15
12
|
16
13
22 | ()?; //~ 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 `()`
21
15
|
22
16
= help: the trait `std::ops::Try` is not implemented for `()`
23
17
= 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
38
32
--> $DIR/try-operator-on-main.rs:32:5
39
33
|
40
34
32 | ()?; //~ 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 `()`
45
36
|
46
37
= help: the trait `std::ops::Try` is not implemented for `()`
47
38
= note: required by `std::ops::Try::into_result`
0 commit comments