Skip to content

Commit

Permalink
Mark RPITIT and AFIT as no longer incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 2, 2023
1 parent 1cb6357 commit 7411468
Show file tree
Hide file tree
Showing 48 changed files with 59 additions and 363 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ declare_features! (
/// Allows `async || body` closures.
(active, async_closure, "1.37.0", Some(62290), None),
/// Allows async functions to be declared, implemented, and used in traits.
(incomplete, async_fn_in_trait, "1.66.0", Some(91611), None),
(active, async_fn_in_trait, "1.66.0", Some(91611), None),
/// Treat `extern "C"` function as nounwind.
(active, c_unwind, "1.52.0", Some(74990), None),
/// Allows using C-variadics.
Expand Down Expand Up @@ -496,7 +496,7 @@ declare_features! (
/// Allows `repr(simd)` and importing the various simd intrinsics.
(active, repr_simd, "1.4.0", Some(27731), None),
/// Allows return-position `impl Trait` in traits.
(incomplete, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None),
(active, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None),
/// Allows bounding the return type of AFIT/RPITIT.
(incomplete, return_type_notation, "1.70.0", Some(109417), None),
/// Allows `extern "rust-cold"`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#![feature(return_type_notation, async_fn_in_trait)]
//~^ WARN the feature `return_type_notation` is incomplete
//~| WARN the feature `async_fn_in_trait` is incomplete

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

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

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

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-inputs-and-output.rs:3:34
|
LL | #![feature(return_type_notation, async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error: argument types not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:11:23
--> $DIR/bad-inputs-and-output.rs:10:23
|
LL | fn foo<T: Trait<method(i32): Send>>() {}
| ^^^^^ help: remove the input types: `()`

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

error: aborting due to 5 previous errors; 2 warnings emitted
error: aborting due to 5 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0658`.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#![feature(return_type_notation, async_fn_in_trait)]
//~^ WARN the feature `return_type_notation` is incomplete
//~| WARN the feature `async_fn_in_trait` is incomplete

trait Foo {
async fn method() -> Result<(), ()>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:34
|
LL | #![feature(return_type_notation, async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

warning: 2 warnings emitted
warning: 1 warning emitted

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

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:34
|
LL | #![feature(return_type_notation, async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error: future cannot be sent between threads safely
--> $DIR/basic.rs:24:13
--> $DIR/basic.rs:23:13
|
LL | is_send(foo::<T>());
| ^^^^^^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/basic.rs:14:5
--> $DIR/basic.rs:13:5
|
LL | T::method().await?;
| ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>>`, which is not `Send`
note: required by a bound in `is_send`
--> $DIR/basic.rs:18:20
--> $DIR/basic.rs:17:20
|
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`

error: aborting due to previous error; 2 warnings emitted
error: aborting due to previous error; 1 warning emitted

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#![feature(return_type_notation, async_fn_in_trait)]
//~^ WARN the feature `return_type_notation` is incomplete
//~| WARN the feature `async_fn_in_trait` is incomplete

use std::future::Future;

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

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/equality.rs:3:34
|
LL | #![feature(return_type_notation, async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error: return type notation is not allowed to use type equality
--> $DIR/equality.rs:13:18
--> $DIR/equality.rs:12:18
|
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error; 2 warnings emitted
error: aborting due to previous error; 1 warning emitted

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#![feature(return_type_notation, async_fn_in_trait)]
//~^ WARN the feature `return_type_notation` is incomplete
//~| WARN the feature `async_fn_in_trait` is incomplete

trait Trait {
async fn method() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/missing.rs:3:34
|
LL | #![feature(return_type_notation, async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error: cannot find associated function `methid` in trait `Trait`
--> $DIR/missing.rs:11:17
--> $DIR/missing.rs:10:17
|
LL | fn bar<T: Trait<methid(): Send>>() {}
| ^^^^^^^^^^^^^^

error: aborting due to previous error; 2 warnings emitted
error: aborting due to previous error; 1 warning emitted

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// revisions: current next

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

use std::future::Future;

Expand Down
15 changes: 3 additions & 12 deletions tests/ui/async-await/in-trait/bad-signatures.current.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
error: expected identifier, found keyword `self`
--> $DIR/bad-signatures.rs:9:23
--> $DIR/bad-signatures.rs:8:23
|
LL | async fn bar(&abc self);
| ^^^^ expected identifier, found keyword

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

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-signatures.rs:5:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

15 changes: 3 additions & 12 deletions tests/ui/async-await/in-trait/bad-signatures.next.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
error: expected identifier, found keyword `self`
--> $DIR/bad-signatures.rs:9:23
--> $DIR/bad-signatures.rs:8:23
|
LL | async fn bar(&abc self);
| ^^^^ expected identifier, found keyword

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

warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-signatures.rs:5:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

1 change: 0 additions & 1 deletion tests/ui/async-await/in-trait/bad-signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// revisions: current next

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

trait MyTrait {
async fn bar(&abc self);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/dont-project-to-specializable-projection.rs:6:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error: async associated function in trait cannot be specialized
--> $DIR/dont-project-to-specializable-projection.rs:16:5
|
Expand All @@ -15,5 +6,5 @@ LL | default async fn foo(_: T) -> &'static str {
|
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed

error: aborting due to previous error; 1 warning emitted
error: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/dont-project-to-specializable-projection.rs:6:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/dont-project-to-specializable-projection.rs:16:35
|
Expand All @@ -29,6 +20,6 @@ LL | default async fn foo(_: T) -> &'static str {
|
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed

error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0053`.
13 changes: 2 additions & 11 deletions tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lifetime-mismatch.rs:5:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
--> $DIR/lifetime-mismatch.rs:14:17
--> $DIR/lifetime-mismatch.rs:13:17
|
LL | async fn foo<'a>(&self);
| ---- lifetimes in impl do not match this method in trait
...
LL | async fn foo(&self) {}
| ^ lifetimes do not match method in trait

error: aborting due to previous error; 1 warning emitted
error: aborting due to previous error

For more information about this error, try `rustc --explain E0195`.
13 changes: 2 additions & 11 deletions tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lifetime-mismatch.rs:5:12
|
LL | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
--> $DIR/lifetime-mismatch.rs:14:17
--> $DIR/lifetime-mismatch.rs:13:17
|
LL | async fn foo<'a>(&self);
| ---- lifetimes in impl do not match this method in trait
...
LL | async fn foo(&self) {}
| ^ lifetimes do not match method in trait

error: aborting due to previous error; 1 warning emitted
error: aborting due to previous error

For more information about this error, try `rustc --explain E0195`.
1 change: 0 additions & 1 deletion tests/ui/async-await/in-trait/lifetime-mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// revisions: current next

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

trait MyTrait {
async fn foo<'a>(&self);
Expand Down
Loading

0 comments on commit 7411468

Please sign in to comment.