1
1
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
2
- --> $DIR/question-mark-await-type-error.rs:16:9
3
- |
4
- 16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
5
- | ^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
6
- |
7
- = help: the trait `std::ops::Try` is not implemented for `()`
8
- = note: required by `std::ops::Try::into_result`
2
+ --> $DIR/question-mark-await-type-error.rs:16:9
3
+ |
4
+ 16| async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
5
+ | ^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
6
+ |
7
+ = help: the trait `std::ops::Try` is not implemented for `()`
8
+ = note: required by `std::ops::Try::into_result`
9
9
10
10
error[E0698]: type inside `async` object must be known in this context
11
11
--> $DIR/question-mark-await-type-error.rs:15:15
@@ -43,18 +43,6 @@ note: the type is part of the `async` object because of this `await`
43
43
16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
44
44
| ^^^^^^^^^^^^^^
45
45
46
- error[E0698]: type inside `async` object must be known in this context
47
- --> $DIR/question-mark-await-type-error.rs:15:15
48
- |
49
- 15 | for _i in 1..2 {
50
- | ^^^^ cannot infer type for `{integer}`
51
- |
52
- note: the type is part of the `async` object because of this `await`
53
- --> $DIR/question-mark-await-type-error.rs:16:9
54
- |
55
- 16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
56
- | ^^^^^^^^^^^^^^
57
-
58
46
error[E0698]: type inside `async` object must be known in this context
59
47
--> $DIR/question-mark-await-type-error.rs:15:9
60
48
|
@@ -68,91 +56,25 @@ note: the type is part of the `async` object because of this `await`
68
56
| ^^^^^^^^^^^^^^
69
57
70
58
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
71
- --> $DIR/question-mark-await-type-error.rs:29:5
72
- |
73
- 29 | #[for_await]
74
- | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
75
- |
76
- = help: the trait `std::ops::Try` is not implemented for `()`
77
- = note: required by `std::ops::Try::into_result`
59
+ --> $DIR/question-mark-await-type-error.rs:29:5
60
+ |
61
+ 29| #[for_await]
62
+ | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
63
+ |
64
+ = help: the trait `std::ops::Try` is not implemented for `()`
65
+ = note: required by `std::ops::Try::into_result`
78
66
79
- error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
80
- --> $DIR/question-mark-await-type-error.rs:23:18
81
- |
82
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
83
- | ^^^^^^ the `?` operator cannot be applied to type `()`
84
- |
85
- = help: the trait `std::ops::Try` is not implemented for `()`
86
- = note: required by `std::ops::Try::into_result`
67
+ error: internal compiler error: src/librustc/ich/impls_ty.rs:100: StableHasher: unexpected region '_#4r
87
68
88
- error[E0698]: type inside generator must be known in this context
89
- --> $DIR/question-mark-await-type-error.rs:22:15
90
- |
91
- 22 | for _i in 1..2 {
92
- | ^^^^ cannot infer type for `{integer}`
93
- |
94
- note: the type is part of the generator because of this `yield`
95
- --> $DIR/question-mark-await-type-error.rs:23:18
96
- |
97
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
98
- | ^^^^^
69
+ thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:912:9
70
+ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
99
71
100
- error[E0698]: type inside generator must be known in this context
101
- --> $DIR/question-mark-await-type-error.rs:22:15
102
- |
103
- 22 | for _i in 1..2 {
104
- | ^ cannot infer type for `{integer}`
105
- |
106
- note: the type is part of the generator because of this `yield`
107
- --> $DIR/question-mark-await-type-error.rs:23:18
108
- |
109
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
110
- | ^^^^^
111
-
112
- error[E0698]: type inside generator must be known in this context
113
- --> $DIR/question-mark-await-type-error.rs:22:18
114
- |
115
- 22 | for _i in 1..2 {
116
- | ^ cannot infer type for `{integer}`
117
- |
118
- note: the type is part of the generator because of this `yield`
119
- --> $DIR/question-mark-await-type-error.rs:23:18
120
- |
121
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
122
- | ^^^^^
72
+ note: the compiler unexpectedly panicked. this is a bug.
123
73
124
- error[E0698]: type inside generator must be known in this context
125
- --> $DIR/question-mark-await-type-error.rs:22:15
126
- |
127
- 22 | for _i in 1..2 {
128
- | ^^^^ cannot infer type for `{integer}`
129
- |
130
- note: the type is part of the generator because of this `yield`
131
- --> $DIR/question-mark-await-type-error.rs:23:18
132
- |
133
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
134
- | ^^^^^
74
+ note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
135
75
136
- error[E0698]: type inside generator must be known in this context
137
- --> $DIR/question-mark-await-type-error.rs:22:9
138
- |
139
- 22 | for _i in 1..2 {
140
- | ^^ cannot infer type for `{integer}`
141
- |
142
- note: the type is part of the generator because of this `yield`
143
- --> $DIR/question-mark-await-type-error.rs:23:18
144
- |
145
- 23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
146
- | ^^^^^
76
+ note: rustc 1.40.0-nightly (702b45e40 2019-10-01) running on x86_64-apple-darwin
147
77
148
- error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
149
- --> $DIR/question-mark-await-type-error.rs:42:18
150
- |
151
- 42 | async {}.await?;
152
- | ^^^^^^ the `?` operator cannot be applied to type `()`
153
- |
154
- = help: the trait `std::ops::Try` is not implemented for `()`
155
- = note: required by `std::ops::Try::into_result`
78
+ note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
156
79
157
- Some errors have detailed explanations: E0277, E0698.
158
- For more information about an error, try `rustc --explain E0277`.
80
+ note: some of the compiler flags provided by cargo are hidden
0 commit comments