Skip to content

Commit 460e265

Browse files
committed
Auto merge of #4423 - lzutao:await-is-stable, r=Manishearth
Remove feature gate for async_await async/await is stablized in #63209 🎉 changelog: none
2 parents 0ccb9ea + 2a66196 commit 460e265

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

tests/ui/issue_4266.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: --edition 2018
2-
#![feature(async_await)]
32
#![allow(dead_code)]
43

54
async fn sink1<'a>(_: &'a str) {} // lint

tests/ui/issue_4266.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
2-
--> $DIR/issue_4266.rs:5:1
2+
--> $DIR/issue_4266.rs:4:1
33
|
44
LL | async fn sink1<'a>(_: &'a str) {} // lint
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
88

99
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
10-
--> $DIR/issue_4266.rs:9:1
10+
--> $DIR/issue_4266.rs:8:1
1111
|
1212
LL | / async fn one_to_one<'a>(s: &'a str) -> &'a str {
1313
LL | | s

tests/ui/methods.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// aux-build:option_helpers.rs
22
// compile-flags: --edition 2018
33

4-
#![feature(async_await)]
54
#![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)]
65
#![allow(
76
clippy::blacklisted_name,

tests/ui/methods.stderr

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: defining a method called `add` on this type; consider implementing the `std::ops::Add` trait or choosing a less ambiguous name
2-
--> $DIR/methods.rs:37:5
2+
--> $DIR/methods.rs:36:5
33
|
44
LL | / pub fn add(self, other: T) -> T {
55
LL | | self
@@ -9,7 +9,7 @@ LL | | }
99
= note: `-D clippy::should-implement-trait` implied by `-D warnings`
1010

1111
error: methods called `new` usually return `Self`
12-
--> $DIR/methods.rs:153:5
12+
--> $DIR/methods.rs:152:5
1313
|
1414
LL | / fn new() -> i32 {
1515
LL | | 0
@@ -19,7 +19,7 @@ LL | | }
1919
= note: `-D clippy::new-ret-no-self` implied by `-D warnings`
2020

2121
error: called `map(f).unwrap_or(a)` on an Option value. This can be done more directly by calling `map_or(a, f)` instead
22-
--> $DIR/methods.rs:175:13
22+
--> $DIR/methods.rs:174:13
2323
|
2424
LL | let _ = opt.map(|x| x + 1)
2525
| _____________^
@@ -31,7 +31,7 @@ LL | | .unwrap_or(0);
3131
= note: replace `map(|x| x + 1).unwrap_or(0)` with `map_or(0, |x| x + 1)`
3232

3333
error: called `map(f).unwrap_or(a)` on an Option value. This can be done more directly by calling `map_or(a, f)` instead
34-
--> $DIR/methods.rs:179:13
34+
--> $DIR/methods.rs:178:13
3535
|
3636
LL | let _ = opt.map(|x| {
3737
| _____________^
@@ -41,7 +41,7 @@ LL | | ).unwrap_or(0);
4141
| |____________________________^
4242

4343
error: called `map(f).unwrap_or(a)` on an Option value. This can be done more directly by calling `map_or(a, f)` instead
44-
--> $DIR/methods.rs:183:13
44+
--> $DIR/methods.rs:182:13
4545
|
4646
LL | let _ = opt.map(|x| x + 1)
4747
| _____________^
@@ -51,15 +51,15 @@ LL | | });
5151
| |__________________^
5252

5353
error: called `map(f).unwrap_or(None)` on an Option value. This can be done more directly by calling `and_then(f)` instead
54-
--> $DIR/methods.rs:188:13
54+
--> $DIR/methods.rs:187:13
5555
|
5656
LL | let _ = opt.map(|x| Some(x + 1)).unwrap_or(None);
5757
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5858
|
5959
= note: replace `map(|x| Some(x + 1)).unwrap_or(None)` with `and_then(|x| Some(x + 1))`
6060

6161
error: called `map(f).unwrap_or(None)` on an Option value. This can be done more directly by calling `and_then(f)` instead
62-
--> $DIR/methods.rs:190:13
62+
--> $DIR/methods.rs:189:13
6363
|
6464
LL | let _ = opt.map(|x| {
6565
| _____________^
@@ -69,7 +69,7 @@ LL | | ).unwrap_or(None);
6969
| |_____________________^
7070

7171
error: called `map(f).unwrap_or(None)` on an Option value. This can be done more directly by calling `and_then(f)` instead
72-
--> $DIR/methods.rs:194:13
72+
--> $DIR/methods.rs:193:13
7373
|
7474
LL | let _ = opt
7575
| _____________^
@@ -80,15 +80,15 @@ LL | | .unwrap_or(None);
8080
= note: replace `map(|x| Some(x + 1)).unwrap_or(None)` with `and_then(|x| Some(x + 1))`
8181

8282
error: called `map(f).unwrap_or(a)` on an Option value. This can be done more directly by calling `map_or(a, f)` instead
83-
--> $DIR/methods.rs:205:13
83+
--> $DIR/methods.rs:204:13
8484
|
8585
LL | let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id);
8686
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
|
8888
= note: replace `map(|p| format!("{}.", p)).unwrap_or(id)` with `map_or(id, |p| format!("{}.", p))`
8989

9090
error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done more directly by calling `map_or_else(g, f)` instead
91-
--> $DIR/methods.rs:209:13
91+
--> $DIR/methods.rs:208:13
9292
|
9393
LL | let _ = opt.map(|x| x + 1)
9494
| _____________^
@@ -100,7 +100,7 @@ LL | | .unwrap_or_else(|| 0);
100100
= note: replace `map(|x| x + 1).unwrap_or_else(|| 0)` with `map_or_else(|| 0, |x| x + 1)`
101101

102102
error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done more directly by calling `map_or_else(g, f)` instead
103-
--> $DIR/methods.rs:213:13
103+
--> $DIR/methods.rs:212:13
104104
|
105105
LL | let _ = opt.map(|x| {
106106
| _____________^
@@ -110,7 +110,7 @@ LL | | ).unwrap_or_else(|| 0);
110110
| |____________________________________^
111111

112112
error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done more directly by calling `map_or_else(g, f)` instead
113-
--> $DIR/methods.rs:217:13
113+
--> $DIR/methods.rs:216:13
114114
|
115115
LL | let _ = opt.map(|x| x + 1)
116116
| _____________^
@@ -120,7 +120,7 @@ LL | | );
120120
| |_________________^
121121

122122
error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
123-
--> $DIR/methods.rs:247:13
123+
--> $DIR/methods.rs:246:13
124124
|
125125
LL | let _ = v.iter().filter(|&x| *x < 0).next();
126126
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -129,7 +129,7 @@ LL | let _ = v.iter().filter(|&x| *x < 0).next();
129129
= note: replace `filter(|&x| *x < 0).next()` with `find(|&x| *x < 0)`
130130

131131
error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
132-
--> $DIR/methods.rs:250:13
132+
--> $DIR/methods.rs:249:13
133133
|
134134
LL | let _ = v.iter().filter(|&x| {
135135
| _____________^
@@ -139,7 +139,7 @@ LL | | ).next();
139139
| |___________________________^
140140

141141
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
142-
--> $DIR/methods.rs:266:13
142+
--> $DIR/methods.rs:265:13
143143
|
144144
LL | let _ = v.iter().find(|&x| *x < 0).is_some();
145145
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -148,7 +148,7 @@ LL | let _ = v.iter().find(|&x| *x < 0).is_some();
148148
= note: replace `find(|&x| *x < 0).is_some()` with `any(|x| *x < 0)`
149149

150150
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
151-
--> $DIR/methods.rs:269:13
151+
--> $DIR/methods.rs:268:13
152152
|
153153
LL | let _ = v.iter().find(|&x| {
154154
| _____________^
@@ -158,15 +158,15 @@ LL | | ).is_some();
158158
| |______________________________^
159159

160160
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
161-
--> $DIR/methods.rs:275:13
161+
--> $DIR/methods.rs:274:13
162162
|
163163
LL | let _ = v.iter().position(|&x| x < 0).is_some();
164164
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165165
|
166166
= note: replace `position(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
167167

168168
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
169-
--> $DIR/methods.rs:278:13
169+
--> $DIR/methods.rs:277:13
170170
|
171171
LL | let _ = v.iter().position(|&x| {
172172
| _____________^
@@ -176,15 +176,15 @@ LL | | ).is_some();
176176
| |______________________________^
177177

178178
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
179-
--> $DIR/methods.rs:284:13
179+
--> $DIR/methods.rs:283:13
180180
|
181181
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
182182
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183183
|
184184
= note: replace `rposition(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
185185

186186
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
187-
--> $DIR/methods.rs:287:13
187+
--> $DIR/methods.rs:286:13
188188
|
189189
LL | let _ = v.iter().rposition(|&x| {
190190
| _____________^
@@ -194,7 +194,7 @@ LL | | ).is_some();
194194
| |______________________________^
195195

196196
error: used unwrap() on an Option value. If you don't want to handle the None case gracefully, consider using expect() to provide a better panic message
197-
--> $DIR/methods.rs:302:13
197+
--> $DIR/methods.rs:301:13
198198
|
199199
LL | let _ = opt.unwrap();
200200
| ^^^^^^^^^^^^

0 commit comments

Comments
 (0)