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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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() {}
Lines changed: 6 additions & 14 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 9 deletions
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

Lines changed: 4 additions & 12 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 2 additions & 10 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 2 additions & 10 deletions
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

0 commit comments

Comments
 (0)