Skip to content

Commit 2e3373c

Browse files
authored
Rollup merge of #111048 - compiler-errors:rpitit-not-incomplete, r=jackh726
Mark`feature(return_position_impl_trait_in_trait)` and`feature(async_fn_in_trait)` as not incomplete I think they've graduated, since as far as I'm aware, they don't cause compiler crashes or unsoundness anymore.
2 parents 40c4ed4 + 7411468 commit 2e3373c

File tree

48 files changed

+59
-363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+59
-363
lines changed

compiler/rustc_feature/src/active.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ declare_features! (
310310
/// Allows `async || body` closures.
311311
(active, async_closure, "1.37.0", Some(62290), None),
312312
/// Allows async functions to be declared, implemented, and used in traits.
313-
(incomplete, async_fn_in_trait, "1.66.0", Some(91611), None),
313+
(active, async_fn_in_trait, "1.66.0", Some(91611), None),
314314
/// Treat `extern "C"` function as nounwind.
315315
(active, c_unwind, "1.52.0", Some(74990), None),
316316
/// Allows using C-variadics.
@@ -494,7 +494,7 @@ declare_features! (
494494
/// Allows `repr(simd)` and importing the various simd intrinsics.
495495
(active, repr_simd, "1.4.0", Some(27731), None),
496496
/// Allows return-position `impl Trait` in traits.
497-
(incomplete, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None),
497+
(active, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None),
498498
/// Allows bounding the return type of AFIT/RPITIT.
499499
(incomplete, return_type_notation, "1.70.0", Some(109417), None),
500500
/// Allows `extern "rust-cold"`.

tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#![feature(return_type_notation, async_fn_in_trait)]
44
//~^ WARN the feature `return_type_notation` is incomplete
5-
//~| WARN the feature `async_fn_in_trait` is incomplete
65

76
trait Trait {
87
async fn method() {}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: return type notation uses `()` instead of `(..)` for elided arguments
2-
--> $DIR/bad-inputs-and-output.rs:19:24
2+
--> $DIR/bad-inputs-and-output.rs:18:24
33
|
44
LL | fn baz<T: Trait<method(..): Send>>() {}
55
| ^^ help: remove the `..`
66

77
error[E0658]: associated type bounds are unstable
8-
--> $DIR/bad-inputs-and-output.rs:11:17
8+
--> $DIR/bad-inputs-and-output.rs:10:17
99
|
1010
LL | fn foo<T: Trait<method(i32): Send>>() {}
1111
| ^^^^^^^^^^^^^^^^^
@@ -14,7 +14,7 @@ LL | fn foo<T: Trait<method(i32): Send>>() {}
1414
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
1515

1616
error[E0658]: associated type bounds are unstable
17-
--> $DIR/bad-inputs-and-output.rs:15:17
17+
--> $DIR/bad-inputs-and-output.rs:14:17
1818
|
1919
LL | fn bar<T: Trait<method() -> (): Send>>() {}
2020
| ^^^^^^^^^^^^^^^^^^^^
@@ -31,26 +31,18 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
3131
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
3232
= note: `#[warn(incomplete_features)]` on by default
3333

34-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
35-
--> $DIR/bad-inputs-and-output.rs:3:34
36-
|
37-
LL | #![feature(return_type_notation, async_fn_in_trait)]
38-
| ^^^^^^^^^^^^^^^^^
39-
|
40-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
41-
4234
error: argument types not allowed with return type notation
43-
--> $DIR/bad-inputs-and-output.rs:11:23
35+
--> $DIR/bad-inputs-and-output.rs:10:23
4436
|
4537
LL | fn foo<T: Trait<method(i32): Send>>() {}
4638
| ^^^^^ help: remove the input types: `()`
4739

4840
error: return type not allowed with return type notation
49-
--> $DIR/bad-inputs-and-output.rs:15:25
41+
--> $DIR/bad-inputs-and-output.rs:14:25
5042
|
5143
LL | fn bar<T: Trait<method() -> (): Send>>() {}
5244
| ^^^^^^ help: remove the return type
5345

54-
error: aborting due to 5 previous errors; 2 warnings emitted
46+
error: aborting due to 5 previous errors; 1 warning emitted
5547

5648
For more information about this error, try `rustc --explain E0658`.

tests/ui/associated-type-bounds/return-type-notation/basic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#![feature(return_type_notation, async_fn_in_trait)]
66
//~^ WARN the feature `return_type_notation` is incomplete
7-
//~| WARN the feature `async_fn_in_trait` is incomplete
87

98
trait Foo {
109
async fn method() -> Result<(), ()>;

tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr

+1-9
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,5 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
77
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
88
= note: `#[warn(incomplete_features)]` on by default
99

10-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
11-
--> $DIR/basic.rs:5:34
12-
|
13-
LL | #![feature(return_type_notation, async_fn_in_trait)]
14-
| ^^^^^^^^^^^^^^^^^
15-
|
16-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
17-
18-
warning: 2 warnings emitted
10+
warning: 1 warning emitted
1911

tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr

+4-12
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,23 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
77
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
88
= note: `#[warn(incomplete_features)]` on by default
99

10-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
11-
--> $DIR/basic.rs:5:34
12-
|
13-
LL | #![feature(return_type_notation, async_fn_in_trait)]
14-
| ^^^^^^^^^^^^^^^^^
15-
|
16-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
17-
1810
error: future cannot be sent between threads safely
19-
--> $DIR/basic.rs:24:13
11+
--> $DIR/basic.rs:23:13
2012
|
2113
LL | is_send(foo::<T>());
2214
| ^^^^^^^^^^ future returned by `foo` is not `Send`
2315
|
2416
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>`
2517
note: future is not `Send` as it awaits another future which is not `Send`
26-
--> $DIR/basic.rs:14:5
18+
--> $DIR/basic.rs:13:5
2719
|
2820
LL | T::method().await?;
2921
| ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>>`, which is not `Send`
3022
note: required by a bound in `is_send`
31-
--> $DIR/basic.rs:18:20
23+
--> $DIR/basic.rs:17:20
3224
|
3325
LL | fn is_send(_: impl Send) {}
3426
| ^^^^ required by this bound in `is_send`
3527

36-
error: aborting due to previous error; 2 warnings emitted
28+
error: aborting due to previous error; 1 warning emitted
3729

tests/ui/associated-type-bounds/return-type-notation/equality.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#![feature(return_type_notation, async_fn_in_trait)]
44
//~^ WARN the feature `return_type_notation` is incomplete
5-
//~| WARN the feature `async_fn_in_trait` is incomplete
65

76
use std::future::Future;
87

tests/ui/associated-type-bounds/return-type-notation/equality.stderr

+2-10
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,11 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
77
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
88
= note: `#[warn(incomplete_features)]` on by default
99

10-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
11-
--> $DIR/equality.rs:3:34
12-
|
13-
LL | #![feature(return_type_notation, async_fn_in_trait)]
14-
| ^^^^^^^^^^^^^^^^^
15-
|
16-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
17-
1810
error: return type notation is not allowed to use type equality
19-
--> $DIR/equality.rs:13:18
11+
--> $DIR/equality.rs:12:18
2012
|
2113
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
2214
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2315

24-
error: aborting due to previous error; 2 warnings emitted
16+
error: aborting due to previous error; 1 warning emitted
2517

tests/ui/associated-type-bounds/return-type-notation/missing.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#![feature(return_type_notation, async_fn_in_trait)]
44
//~^ WARN the feature `return_type_notation` is incomplete
5-
//~| WARN the feature `async_fn_in_trait` is incomplete
65

76
trait Trait {
87
async fn method() {}

tests/ui/associated-type-bounds/return-type-notation/missing.stderr

+2-10
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,11 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
77
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
88
= note: `#[warn(incomplete_features)]` on by default
99

10-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
11-
--> $DIR/missing.rs:3:34
12-
|
13-
LL | #![feature(return_type_notation, async_fn_in_trait)]
14-
| ^^^^^^^^^^^^^^^^^
15-
|
16-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
17-
1810
error: cannot find associated function `methid` in trait `Trait`
19-
--> $DIR/missing.rs:11:17
11+
--> $DIR/missing.rs:10:17
2012
|
2113
LL | fn bar<T: Trait<methid(): Send>>() {}
2214
| ^^^^^^^^^^^^^^
2315

24-
error: aborting due to previous error; 2 warnings emitted
16+
error: aborting due to previous error; 1 warning emitted
2517

tests/ui/async-await/in-trait/async-default-fn-overridden.current.stderr

-11
This file was deleted.

tests/ui/async-await/in-trait/async-default-fn-overridden.next.stderr

-11
This file was deleted.

tests/ui/async-await/in-trait/async-default-fn-overridden.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// revisions: current next
55

66
#![feature(async_fn_in_trait)]
7-
//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use
87

98
use std::future::Future;
109

Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
error: expected identifier, found keyword `self`
2-
--> $DIR/bad-signatures.rs:9:23
2+
--> $DIR/bad-signatures.rs:8:23
33
|
44
LL | async fn bar(&abc self);
55
| ^^^^ expected identifier, found keyword
66

77
error: expected one of `:`, `@`, or `|`, found keyword `self`
8-
--> $DIR/bad-signatures.rs:9:23
8+
--> $DIR/bad-signatures.rs:8:23
99
|
1010
LL | async fn bar(&abc self);
1111
| -----^^^^
1212
| | |
1313
| | expected one of `:`, `@`, or `|`
1414
| help: declare the type after the parameter binding: `<identifier>: <type>`
1515

16-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
17-
--> $DIR/bad-signatures.rs:5:12
18-
|
19-
LL | #![feature(async_fn_in_trait)]
20-
| ^^^^^^^^^^^^^^^^^
21-
|
22-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
23-
= note: `#[warn(incomplete_features)]` on by default
24-
25-
error: aborting due to 2 previous errors; 1 warning emitted
16+
error: aborting due to 2 previous errors
2617

Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
error: expected identifier, found keyword `self`
2-
--> $DIR/bad-signatures.rs:9:23
2+
--> $DIR/bad-signatures.rs:8:23
33
|
44
LL | async fn bar(&abc self);
55
| ^^^^ expected identifier, found keyword
66

77
error: expected one of `:`, `@`, or `|`, found keyword `self`
8-
--> $DIR/bad-signatures.rs:9:23
8+
--> $DIR/bad-signatures.rs:8:23
99
|
1010
LL | async fn bar(&abc self);
1111
| -----^^^^
1212
| | |
1313
| | expected one of `:`, `@`, or `|`
1414
| help: declare the type after the parameter binding: `<identifier>: <type>`
1515

16-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
17-
--> $DIR/bad-signatures.rs:5:12
18-
|
19-
LL | #![feature(async_fn_in_trait)]
20-
| ^^^^^^^^^^^^^^^^^
21-
|
22-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
23-
= note: `#[warn(incomplete_features)]` on by default
24-
25-
error: aborting due to 2 previous errors; 1 warning emitted
16+
error: aborting due to 2 previous errors
2617

tests/ui/async-await/in-trait/bad-signatures.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// revisions: current next
44

55
#![feature(async_fn_in_trait)]
6-
//~^ WARN the feature `async_fn_in_trait` is incomplete
76

87
trait MyTrait {
98
async fn bar(&abc self);
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/dont-project-to-specializable-projection.rs:6:12
3-
|
4-
LL | #![feature(async_fn_in_trait)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error: async associated function in trait cannot be specialized
112
--> $DIR/dont-project-to-specializable-projection.rs:16:5
123
|
@@ -15,5 +6,5 @@ LL | default async fn foo(_: T) -> &'static str {
156
|
167
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
178

18-
error: aborting due to previous error; 1 warning emitted
9+
error: aborting due to previous error
1910

tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/dont-project-to-specializable-projection.rs:6:12
3-
|
4-
LL | #![feature(async_fn_in_trait)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error[E0053]: method `foo` has an incompatible type for trait
112
--> $DIR/dont-project-to-specializable-projection.rs:16:35
123
|
@@ -29,6 +20,6 @@ LL | default async fn foo(_: T) -> &'static str {
2920
|
3021
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
3122

32-
error: aborting due to 2 previous errors; 1 warning emitted
23+
error: aborting due to 2 previous errors
3324

3425
For more information about this error, try `rustc --explain E0053`.
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/lifetime-mismatch.rs:5:12
3-
|
4-
LL | #![feature(async_fn_in_trait)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
11-
--> $DIR/lifetime-mismatch.rs:14:17
2+
--> $DIR/lifetime-mismatch.rs:13:17
123
|
134
LL | async fn foo<'a>(&self);
145
| ---- lifetimes in impl do not match this method in trait
156
...
167
LL | async fn foo(&self) {}
178
| ^ lifetimes do not match method in trait
189

19-
error: aborting due to previous error; 1 warning emitted
10+
error: aborting due to previous error
2011

2112
For more information about this error, try `rustc --explain E0195`.
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/lifetime-mismatch.rs:5:12
3-
|
4-
LL | #![feature(async_fn_in_trait)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
11-
--> $DIR/lifetime-mismatch.rs:14:17
2+
--> $DIR/lifetime-mismatch.rs:13:17
123
|
134
LL | async fn foo<'a>(&self);
145
| ---- lifetimes in impl do not match this method in trait
156
...
167
LL | async fn foo(&self) {}
178
| ^ lifetimes do not match method in trait
189

19-
error: aborting due to previous error; 1 warning emitted
10+
error: aborting due to previous error
2011

2112
For more information about this error, try `rustc --explain E0195`.

tests/ui/async-await/in-trait/lifetime-mismatch.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// revisions: current next
44

55
#![feature(async_fn_in_trait)]
6-
//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
76

87
trait MyTrait {
98
async fn foo<'a>(&self);

0 commit comments

Comments
 (0)