Skip to content

Commit 1ffd09a

Browse files
Stabilize AFIT and RPITIT
1 parent 0b8495b commit 1ffd09a

File tree

5 files changed

+21
-24
lines changed

5 files changed

+21
-24
lines changed

tests/ui/implied_bounds_in_impls.fixed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![warn(clippy::implied_bounds_in_impls)]
22
#![allow(dead_code)]
3-
#![feature(return_position_impl_trait_in_trait)]
43

54
use std::ops::{Deref, DerefMut};
65

tests/ui/implied_bounds_in_impls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![warn(clippy::implied_bounds_in_impls)]
22
#![allow(dead_code)]
3-
#![feature(return_position_impl_trait_in_trait)]
43

54
use std::ops::{Deref, DerefMut};
65

tests/ui/implied_bounds_in_impls.stderr

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this bound is already specified as the supertrait of `DerefMut<Target = T>`
2-
--> $DIR/implied_bounds_in_impls.rs:13:36
2+
--> $DIR/implied_bounds_in_impls.rs:12:36
33
|
44
LL | fn deref_derefmut<T>(x: T) -> impl Deref<Target = T> + DerefMut<Target = T> {
55
| ^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL + fn deref_derefmut<T>(x: T) -> impl DerefMut<Target = T> {
1313
|
1414

1515
error: this bound is already specified as the supertrait of `GenericSubtrait<U, W, U>`
16-
--> $DIR/implied_bounds_in_impls.rs:30:37
16+
--> $DIR/implied_bounds_in_impls.rs:29:37
1717
|
1818
LL | fn generics_implied<U, W>() -> impl GenericTrait<W> + GenericSubtrait<U, W, U>
1919
| ^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL + fn generics_implied<U, W>() -> impl GenericSubtrait<U, W, U>
2525
|
2626

2727
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, V>`
28-
--> $DIR/implied_bounds_in_impls.rs:36:40
28+
--> $DIR/implied_bounds_in_impls.rs:35:40
2929
|
3030
LL | fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
3131
| ^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL + fn generics_implied_multi<V>() -> impl GenericTrait2<V> + GenericSubtrait<(
3737
|
3838

3939
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, V>`
40-
--> $DIR/implied_bounds_in_impls.rs:36:60
40+
--> $DIR/implied_bounds_in_impls.rs:35:60
4141
|
4242
LL | fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
4343
| ^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericSubtrait<
4949
|
5050

5151
error: this bound is already specified as the supertrait of `GenericSubtrait<(), T, V>`
52-
--> $DIR/implied_bounds_in_impls.rs:38:44
52+
--> $DIR/implied_bounds_in_impls.rs:37:44
5353
|
5454
LL | fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
5555
| ^^^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ LL + fn generics_implied_multi2<T, V>() -> impl GenericTrait2<V> + GenericSubtra
6161
|
6262

6363
error: this bound is already specified as the supertrait of `GenericSubtrait<(), T, V>`
64-
--> $DIR/implied_bounds_in_impls.rs:38:62
64+
--> $DIR/implied_bounds_in_impls.rs:37:62
6565
|
6666
LL | fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
6767
| ^^^^^^^^^^^^^^^^
@@ -73,7 +73,7 @@ LL + fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericSubtrai
7373
|
7474

7575
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, ()>`
76-
--> $DIR/implied_bounds_in_impls.rs:48:28
76+
--> $DIR/implied_bounds_in_impls.rs:47:28
7777
|
7878
LL | fn generics_same() -> impl GenericTrait<i32> + GenericSubtrait<(), i32, ()> {}
7979
| ^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL + fn generics_same() -> impl GenericSubtrait<(), i32, ()> {}
8585
|
8686

8787
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
88-
--> $DIR/implied_bounds_in_impls.rs:52:20
88+
--> $DIR/implied_bounds_in_impls.rs:51:20
8989
|
9090
LL | fn f() -> impl Deref + DerefMut<Target = u8>;
9191
| ^^^^^
@@ -97,7 +97,7 @@ LL + fn f() -> impl DerefMut<Target = u8>;
9797
|
9898

9999
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
100-
--> $DIR/implied_bounds_in_impls.rs:57:20
100+
--> $DIR/implied_bounds_in_impls.rs:56:20
101101
|
102102
LL | fn f() -> impl Deref + DerefMut<Target = u8> {
103103
| ^^^^^
@@ -109,7 +109,7 @@ LL + fn f() -> impl DerefMut<Target = u8> {
109109
|
110110

111111
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
112-
--> $DIR/implied_bounds_in_impls.rs:63:20
112+
--> $DIR/implied_bounds_in_impls.rs:62:20
113113
|
114114
LL | fn f() -> impl Deref + DerefMut<Target = u8> {
115115
| ^^^^^
@@ -121,7 +121,7 @@ LL + fn f() -> impl DerefMut<Target = u8> {
121121
|
122122

123123
error: this bound is already specified as the supertrait of `PartialOrd`
124-
--> $DIR/implied_bounds_in_impls.rs:74:41
124+
--> $DIR/implied_bounds_in_impls.rs:73:41
125125
|
126126
LL | fn default_generic_param1() -> impl PartialEq + PartialOrd + Debug {}
127127
| ^^^^^^^^^
@@ -133,7 +133,7 @@ LL + fn default_generic_param1() -> impl PartialOrd + Debug {}
133133
|
134134

135135
error: this bound is already specified as the supertrait of `PartialOrd`
136-
--> $DIR/implied_bounds_in_impls.rs:75:54
136+
--> $DIR/implied_bounds_in_impls.rs:74:54
137137
|
138138
LL | fn default_generic_param2() -> impl PartialOrd + PartialEq + Debug {}
139139
| ^^^^^^^^^
@@ -145,7 +145,7 @@ LL + fn default_generic_param2() -> impl PartialOrd + Debug {}
145145
|
146146

147147
error: this bound is already specified as the supertrait of `DoubleEndedIterator`
148-
--> $DIR/implied_bounds_in_impls.rs:88:26
148+
--> $DIR/implied_bounds_in_impls.rs:87:26
149149
|
150150
LL | fn my_iter() -> impl Iterator<Item = u32> + DoubleEndedIterator {
151151
| ^^^^^^^^^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL + fn my_iter() -> impl DoubleEndedIterator<Item = u32> {
157157
|
158158

159159
error: this bound is already specified as the supertrait of `Copy`
160-
--> $DIR/implied_bounds_in_impls.rs:93:27
160+
--> $DIR/implied_bounds_in_impls.rs:92:27
161161
|
162162
LL | fn f() -> impl Copy + Clone {
163163
| ^^^^^
@@ -169,7 +169,7 @@ LL + fn f() -> impl Copy {
169169
|
170170

171171
error: this bound is already specified as the supertrait of `Trait2<i32>`
172-
--> $DIR/implied_bounds_in_impls.rs:107:21
172+
--> $DIR/implied_bounds_in_impls.rs:106:21
173173
|
174174
LL | fn f2() -> impl Trait1<i32, U = i64> + Trait2<i32> {}
175175
| ^^^^^^^^^^^^^^^^^^^^
@@ -181,7 +181,7 @@ LL + fn f2() -> impl Trait2<i32, U = i64> {}
181181
|
182182

183183
error: this bound is already specified as the supertrait of `Trait4<i8, X = i32>`
184-
--> $DIR/implied_bounds_in_impls.rs:122:21
184+
--> $DIR/implied_bounds_in_impls.rs:121:21
185185
|
186186
LL | fn f3() -> impl Trait3<i8, i16, i64, X = i32, Y = i128> + Trait4<i8, X = i32> {}
187187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/unused_async.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![warn(clippy::unused_async)]
2-
#![feature(async_fn_in_trait)]
32
#![allow(incomplete_features)]
43

54
use std::future::Future;

tests/ui/unused_async.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unused `async` for function with no await statements
2-
--> $DIR/unused_async.rs:13:5
2+
--> $DIR/unused_async.rs:12:5
33
|
44
LL | / async fn async_block_await() {
55
LL | |
@@ -11,23 +11,23 @@ LL | | }
1111
|
1212
= help: consider removing the `async` from this function
1313
note: `await` used in an async block, which does not require the enclosing function to be `async`
14-
--> $DIR/unused_async.rs:16:23
14+
--> $DIR/unused_async.rs:15:23
1515
|
1616
LL | ready(()).await;
1717
| ^^^^^
1818
= note: `-D clippy::unused-async` implied by `-D warnings`
1919
= help: to override `-D warnings` add `#[allow(clippy::unused_async)]`
2020

2121
error: unused `async` for function with no await statements
22-
--> $DIR/unused_async.rs:46:5
22+
--> $DIR/unused_async.rs:45:5
2323
|
2424
LL | async fn f3() {}
2525
| ^^^^^^^^^^^^^^^^
2626
|
2727
= help: consider removing the `async` from this function
2828

2929
error: unused `async` for function with no await statements
30-
--> $DIR/unused_async.rs:59:1
30+
--> $DIR/unused_async.rs:58:1
3131
|
3232
LL | / async fn foo() -> i32 {
3333
LL | |
@@ -38,7 +38,7 @@ LL | | }
3838
= help: consider removing the `async` from this function
3939

4040
error: unused `async` for function with no await statements
41-
--> $DIR/unused_async.rs:71:5
41+
--> $DIR/unused_async.rs:70:5
4242
|
4343
LL | / async fn unused(&self) -> i32 {
4444
LL | |

0 commit comments

Comments
 (0)