Rollup merge of #130705 - compiler-errors:rtn-complete, r=jackh726

No longer mark RTN as incomplete

The RFC is accepted and the feature is basically fully implemented. This doesn't mean it's necesarily *ready* for stabiliation; there's probably some diagnostic improvements to be made, and as always, users uncover the most creative bugs.

But marking this feature as incomplete no longer serves any purpose, so let's fix that.
This commit is contained in:
Matthias Krüger 2024-09-23 06:45:34 +02:00 committed by GitHub
commit 9f5cbfb455
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
64 changed files with 77 additions and 430 deletions

View File

@ -578,7 +578,7 @@ declare_features! (
/// be used to describe E or vise-versa.
(unstable, result_ffi_guarantees, "1.80.0", Some(110503)),
/// Allows bounding the return type of AFIT/RPITIT.
(incomplete, return_type_notation, "1.70.0", Some(109417)),
(unstable, return_type_notation, "1.70.0", Some(109417)),
/// Allows `extern "rust-cold"`.
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics

View File

@ -1,7 +1,6 @@
//@ edition: 2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
async fn method() {}

View File

@ -1,66 +1,57 @@
error[E0575]: expected associated type, found associated function `Trait::method`
--> $DIR/bad-inputs-and-output.rs:28:36
--> $DIR/bad-inputs-and-output.rs:27:36
|
LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
error[E0575]: expected associated type, found associated function `Trait::method`
--> $DIR/bad-inputs-and-output.rs:31:36
--> $DIR/bad-inputs-and-output.rs:30:36
|
LL | fn bar_qualified<T: Trait>() where <T as Trait>::method() -> (): Send {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
error[E0575]: expected associated type, found associated function `Trait::method`
--> $DIR/bad-inputs-and-output.rs:34:36
--> $DIR/bad-inputs-and-output.rs:33:36
|
LL | fn baz_qualified<T: Trait>() where <T as Trait>::method(): Send {}
| ^^^^^^^^^^^^^^^^^^^^^^ not a associated type
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-inputs-and-output.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: argument types not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:10:23
--> $DIR/bad-inputs-and-output.rs:9: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:13:25
--> $DIR/bad-inputs-and-output.rs:12:25
|
LL | fn bar<T: Trait<method() -> (): Send>>() {}
| ^^^^^^ help: remove the return type
error: return type notation arguments must be elided with `..`
--> $DIR/bad-inputs-and-output.rs:16:23
--> $DIR/bad-inputs-and-output.rs:15:23
|
LL | fn baz<T: Trait<method(): Send>>() {}
| ^^ help: add `..`: `(..)`
error: argument types not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:19:40
--> $DIR/bad-inputs-and-output.rs:18:40
|
LL | fn foo_path<T: Trait>() where T::method(i32): Send {}
| ^^^^^ help: remove the input types: `()`
error: return type not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:22:42
--> $DIR/bad-inputs-and-output.rs:21:42
|
LL | fn bar_path<T: Trait>() where T::method() -> (): Send {}
| ^^^^^^ help: remove the return type
error: return type notation arguments must be elided with `..`
--> $DIR/bad-inputs-and-output.rs:25:40
--> $DIR/bad-inputs-and-output.rs:24:40
|
LL | fn baz_path<T: Trait>() where T::method(): Send {}
| ^^ help: add `..`: `(..)`
error: aborting due to 9 previous errors; 1 warning emitted
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0575`.

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Tr {
const CONST: usize;

View File

@ -1,23 +1,14 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bare-path.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation not allowed in this position yet
--> $DIR/bare-path.rs:15:23
--> $DIR/bare-path.rs:14:23
|
LL | let _ = T::CONST::(..);
| ^^^^
error: return type notation not allowed in this position yet
--> $DIR/bare-path.rs:17:12
--> $DIR/bare-path.rs:16:12
|
LL | let _: T::method(..);
| ^^^^^^^^^^^^^
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

View File

@ -3,7 +3,6 @@
//@ [with] check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
async fn method() -> Result<(), ()>;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,29 +1,20 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: future cannot be sent between threads safely
--> $DIR/basic.rs:23:13
--> $DIR/basic.rs:22: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<(), ()>> { <T as Foo>::method(..) }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/basic.rs:13:5
--> $DIR/basic.rs:12:5
|
LL | T::method().await?;
| ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`, which is not `Send`
note: required by a bound in `is_send`
--> $DIR/basic.rs:17:20
--> $DIR/basic.rs:16:20
|
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {}
fn needs_trait(_: impl Trait) {}

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/display.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0277]: the trait bound `impl Sized { <T as Assoc>::method(..) }: Trait` is not satisfied
--> $DIR/display.rs:15:17
--> $DIR/display.rs:14:17
|
LL | needs_trait(T::method());
| ----------- ^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method(..) }`
@ -16,13 +7,13 @@ LL | needs_trait(T::method());
| required by a bound introduced by this call
|
note: required by a bound in `needs_trait`
--> $DIR/display.rs:5:24
--> $DIR/display.rs:4:24
|
LL | fn needs_trait(_: impl Trait) {}
| ^^^^^ required by this bound in `needs_trait`
error[E0277]: the trait bound `impl Sized { <T as Assoc>::method_with_lt(..) }: Trait` is not satisfied
--> $DIR/display.rs:17:17
--> $DIR/display.rs:16:17
|
LL | needs_trait(T::method_with_lt());
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method_with_lt(..) }`
@ -30,13 +21,13 @@ LL | needs_trait(T::method_with_lt());
| required by a bound introduced by this call
|
note: required by a bound in `needs_trait`
--> $DIR/display.rs:5:24
--> $DIR/display.rs:4:24
|
LL | fn needs_trait(_: impl Trait) {}
| ^^^^^ required by this bound in `needs_trait`
error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
--> $DIR/display.rs:19:17
--> $DIR/display.rs:18:17
|
LL | needs_trait(T::method_with_ty());
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
@ -44,18 +35,18 @@ LL | needs_trait(T::method_with_ty());
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/display.rs:4:1
--> $DIR/display.rs:3:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `needs_trait`
--> $DIR/display.rs:5:24
--> $DIR/display.rs:4:24
|
LL | fn needs_trait(_: impl Trait) {}
| ^^^^^ required by this bound in `needs_trait`
error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
--> $DIR/display.rs:21:17
--> $DIR/display.rs:20:17
|
LL | needs_trait(T::method_with_ct());
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
@ -63,16 +54,16 @@ LL | needs_trait(T::method_with_ct());
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/display.rs:4:1
--> $DIR/display.rs:3:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `needs_trait`
--> $DIR/display.rs:5:24
--> $DIR/display.rs:4:24
|
LL | fn needs_trait(_: impl Trait) {}
| ^^^^^ required by this bound in `needs_trait`
error: aborting due to 4 previous errors; 1 warning emitted
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,7 +1,6 @@
//@ edition: 2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
use std::future::Future;

View File

@ -1,17 +1,8 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/equality.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation is not allowed to use type equality
--> $DIR/equality.rs:12:18
--> $DIR/equality.rs:11:18
|
LL | fn test<T: Trait<method(..) = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait<'a> {
fn late<'b>(&'b self, _: &'a ()) -> impl Sized;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/higher-ranked-bound-works.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,7 +1,6 @@
//@ edition: 2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait HealthCheck {
async fn check<const N: usize>() -> bool;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-120208-higher-ranked-const.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation is not allowed for functions that have const parameters
--> $DIR/issue-120208-higher-ranked-const.rs:12:21
--> $DIR/issue-120208-higher-ranked-const.rs:11:21
|
LL | async fn check<const N: usize>() -> bool;
| -------------- const parameter declared here
@ -16,5 +7,5 @@ LL | async fn check<const N: usize>() -> bool;
LL | HC: HealthCheck<check(..): Send> + Send + 'static,
| ^^^^^^^^^^^^^^^
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

View File

@ -1,7 +1,6 @@
//@ edition: 2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
async fn method() {}

View File

@ -1,18 +1,9 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/missing.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0220]: associated function `methid` not found for `Trait`
--> $DIR/missing.rs:10:17
--> $DIR/missing.rs:9:17
|
LL | fn bar<T: Trait<methid(..): Send>>() {}
| ^^^^^^ help: there is an associated function with a similar name: `method`
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.

View File

@ -2,7 +2,6 @@
#![allow(non_camel_case_types)]
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
type test;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/namespace-conflict.rs:4:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() {}

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/non-rpitit.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation used on function that is not `async` and does not return `impl Trait`
--> $DIR/non-rpitit.rs:8:19
--> $DIR/non-rpitit.rs:7:19
|
LL | fn method() {}
| ----------- this function must be `async` or return `impl Trait`
@ -19,7 +10,7 @@ LL | fn bound<T: Trait<method(..): Send>>() {}
= note: function returns `()`, which is not compatible with associated type return bounds
error: return type notation used on function that is not `async` and does not return `impl Trait`
--> $DIR/non-rpitit.rs:11:30
--> $DIR/non-rpitit.rs:10:30
|
LL | fn method() {}
| ----------- this function must be `async` or return `impl Trait`
@ -29,5 +20,5 @@ LL | fn path<T>() where T: Trait, T::method(..): Send {}
|
= note: function returns `()`, which is not compatible with associated type return bounds
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
fn function() {}

View File

@ -1,49 +1,40 @@
error[E0575]: expected function, found function `function`
--> $DIR/not-a-method.rs:8:5
--> $DIR/not-a-method.rs:7:5
|
LL | function(..): Send,
| ^^^^^^^^^^^^ not a function
error[E0573]: expected type, found function `function`
--> $DIR/not-a-method.rs:16:5
--> $DIR/not-a-method.rs:15:5
|
LL | function(): Send,
| ^^^^^^^^^^ not a type
error[E0576]: cannot find function `method` in this scope
--> $DIR/not-a-method.rs:28:5
--> $DIR/not-a-method.rs:27:5
|
LL | method(..): Send,
| ^^^^^^ not found in this scope
error[E0412]: cannot find type `method` in this scope
--> $DIR/not-a-method.rs:37:5
--> $DIR/not-a-method.rs:36:5
|
LL | method(): Send,
| ^^^^^^ not found in this scope
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/not-a-method.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation not allowed in this position yet
--> $DIR/not-a-method.rs:8:5
--> $DIR/not-a-method.rs:7:5
|
LL | function(..): Send,
| ^^^^^^^^^^^^
error: return type notation not allowed in this position yet
--> $DIR/not-a-method.rs:28:5
--> $DIR/not-a-method.rs:27:5
|
LL | method(..): Send,
| ^^^^^^^^^^
error: aborting due to 6 previous errors; 1 warning emitted
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0412, E0573, E0575, E0576.
For more information about an error, try `rustc --explain E0412`.

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait A {
fn method() -> impl Sized;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-ambiguous.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0221]: ambiguous associated function `method` in bounds of `T`
--> $DIR/path-ambiguous.rs:13:5
--> $DIR/path-ambiguous.rs:12:5
|
LL | fn method() -> impl Sized;
| -------------------------- ambiguous `method` from `A`
@ -29,7 +20,7 @@ LL | <T as A>::method(..): Send,
| ~~~~~~~~~~
error[E0221]: ambiguous associated function `method` in bounds of `T`
--> $DIR/path-ambiguous.rs:22:5
--> $DIR/path-ambiguous.rs:21:5
|
LL | fn method() -> impl Sized;
| -------------------------- ambiguous `method` from `A`
@ -49,6 +40,6 @@ help: use fully-qualified syntax to disambiguate
LL | <T as A>::method(..): Send,
| ~~~~~~~~~~
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 E0221`.

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() -> impl Sized;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-constrained-in-method.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait A<'a> {
fn method() -> impl Sized;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-higher-ranked.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0212]: cannot use the associated function of a trait with uninferred generic parameters
--> $DIR/path-higher-ranked.rs:12:5
--> $DIR/path-higher-ranked.rs:11:5
|
LL | T::method(..): Send,
| ^^^^^^^^^^^^^
@ -19,7 +10,7 @@ LL | <T as A<'_>>::method(..): Send,
| ~~~~~~~~~~~~~~
error[E0212]: cannot use the associated function of a trait with uninferred generic parameters
--> $DIR/path-higher-ranked.rs:20:5
--> $DIR/path-higher-ranked.rs:19:5
|
LL | T::method(..): Send,
| ^^^^^^^^^^^^^
@ -29,6 +20,6 @@ help: use a fully qualified path with inferred lifetimes
LL | <T as A<'_>>::method(..): Send,
| ~~~~~~~~~~~~~~
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 E0212`.

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait A {
#[allow(non_camel_case_types)]

View File

@ -1,33 +1,24 @@
error[E0576]: cannot find method or associated constant `method` in trait `A`
--> $DIR/path-missing.rs:11:15
--> $DIR/path-missing.rs:10:15
|
LL | <T as A>::method(..): Send,
| ^^^^^^ not found in `A`
error[E0575]: expected method or associated constant, found associated type `A::bad`
--> $DIR/path-missing.rs:13:5
--> $DIR/path-missing.rs:12:5
|
LL | <T as A>::bad(..): Send,
| ^^^^^^^^^^^^^^^^^
|
= note: can't use a type alias as a constructor
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-missing.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0220]: associated function `method` not found for `T`
--> $DIR/path-missing.rs:20:8
--> $DIR/path-missing.rs:19:8
|
LL | T::method(..): Send,
| ^^^^^^ associated function `method` not found
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0220, E0575, E0576.
For more information about an error, try `rustc --explain E0220`.

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() -> impl Sized;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-no-qself.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0223]: ambiguous associated type
--> $DIR/path-no-qself.rs:10:5
--> $DIR/path-no-qself.rs:9:5
|
LL | Trait::method(..): Send,
| ^^^^^^^^^^^^^^^^^
@ -18,6 +9,6 @@ help: if there were a type named `Example` that implemented `Trait`, you could u
LL | <Example as Trait>::method: Send,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() -> impl Sized;

View File

@ -1,30 +1,21 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-non-param-qself.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0223]: ambiguous associated function
--> $DIR/path-non-param-qself.rs:12:5
--> $DIR/path-non-param-qself.rs:11:5
|
LL | <()>::method(..): Send,
| ^^^^^^^^^^^^^^^^
error[E0223]: ambiguous associated function
--> $DIR/path-non-param-qself.rs:14:5
--> $DIR/path-non-param-qself.rs:13:5
|
LL | i32::method(..): Send,
| ^^^^^^^^^^^^^^^
error[E0223]: ambiguous associated function
--> $DIR/path-non-param-qself.rs:16:5
--> $DIR/path-non-param-qself.rs:15:5
|
LL | Adt::method(..): Send,
| ^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0223`.

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
fn method() -> impl Sized;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-self-qself.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
fn method<T>() -> impl Sized;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-type-param.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation is not allowed for functions that have type parameters
--> $DIR/path-type-param.rs:10:5
--> $DIR/path-type-param.rs:9:5
|
LL | fn method<T>() -> impl Sized;
| - type parameter declared here
@ -17,7 +8,7 @@ LL | <T as Foo>::method(..): Send,
| ^^^^^^^^^^^^^^^^^^^^^^
error: return type notation is not allowed for functions that have type parameters
--> $DIR/path-type-param.rs:17:5
--> $DIR/path-type-param.rs:16:5
|
LL | fn method<T>() -> impl Sized;
| - type parameter declared here
@ -25,5 +16,5 @@ LL | fn method<T>() -> impl Sized;
LL | <T as Foo>::method(..): Send,
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() -> impl Sized;

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-unsatisfied.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0277]: `*mut ()` cannot be sent between threads safely
--> $DIR/path-unsatisfied.rs:23:12
--> $DIR/path-unsatisfied.rs:22:12
|
LL | fn method() -> impl Sized {
| ---------- within this `impl Sized`
@ -18,12 +9,12 @@ LL | test::<DoesntWork>();
|
= help: within `impl Sized`, the trait `Send` is not implemented for `*mut ()`, which is required by `impl Sized: Send`
note: required because it appears within the type `impl Sized`
--> $DIR/path-unsatisfied.rs:10:20
--> $DIR/path-unsatisfied.rs:9:20
|
LL | fn method() -> impl Sized {
| ^^^^^^^^^^
note: required by a bound in `test`
--> $DIR/path-unsatisfied.rs:18:20
--> $DIR/path-unsatisfied.rs:17:20
|
LL | fn test<T: Trait>()
| ---- required by a bound in this function
@ -31,6 +22,6 @@ LL | where
LL | T::method(..): Send,
| ^^^^ required by this bound in `test`
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
fn method() -> impl Sized;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/path-works.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,12 +1,3 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-110963-early.rs:4:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: implementation of `Send` is not general enough
--> $DIR/issue-110963-early.rs:14:5
|
@ -36,5 +27,5 @@ LL | | });
= note: ...but `Send` is actually implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'2>(..) }`, for some specific lifetime `'2`
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

View File

@ -2,7 +2,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait HealthCheck {
async fn check(&mut self) -> bool;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-110963-late.rs:4:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:7:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:7:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -5,7 +5,6 @@
//@ edition:2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
async fn bar(&self);

View File

@ -2,7 +2,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
use std::future::Future;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/rtn-implied-in-supertrait.rs:4:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,5 +1,4 @@
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
// Shouldn't ICE when we have a (bad) RTN in an impl header

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/rtn-in-impl-signature.rs:1:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0229]: associated item constraints are not allowed here
--> $DIR/rtn-in-impl-signature.rs:10:17
--> $DIR/rtn-in-impl-signature.rs:9:17
|
LL | impl Super1<'_, bar(..): Send> for () {}
| ^^^^^^^^^^^^^ associated item constraint not allowed here
@ -20,7 +11,7 @@ LL + impl Super1<'_> for () {}
|
error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/rtn-in-impl-signature.rs:10:1
--> $DIR/rtn-in-impl-signature.rs:9:1
|
LL | fn bar<'b>() -> bool;
| --------------------- `bar` from trait
@ -28,7 +19,7 @@ LL | fn bar<'b>() -> bool;
LL | impl Super1<'_, bar(..): Send> for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0046, E0229.
For more information about an error, try `rustc --explain E0046`.

View File

@ -1,7 +1,6 @@
//@ edition:2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Super1<'a> {
async fn test();

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-method-bound-ambig.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error[E0221]: ambiguous associated function `test` in bounds of `Foo`
--> $DIR/super-method-bound-ambig.rs:25:12
--> $DIR/super-method-bound-ambig.rs:24:12
|
LL | async fn test();
| ---------------- ambiguous `test` from `for<'a> Super1<'a>`
@ -19,6 +10,6 @@ LL | async fn test();
LL | T: Foo<test(..): Send>,
| ^^^^^^^^^^^^^^ ambiguous associated function `test`
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0221`.

View File

@ -2,7 +2,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Super<'a> {
async fn test();

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-method-bound.rs:4:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete and may not be safe to use
trait IntFactory {
fn stream(&self) -> impl Iterator<Item = i32>;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/supertrait-bound.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted

View File

@ -1,7 +1,6 @@
//@ edition: 2021
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
async fn bar<T>() {}

View File

@ -1,14 +1,5 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/ty-or-ct-params.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
error: return type notation is not allowed for functions that have type parameters
--> $DIR/ty-or-ct-params.rs:14:12
--> $DIR/ty-or-ct-params.rs:13:12
|
LL | async fn bar<T>() {}
| - type parameter declared here
@ -17,7 +8,7 @@ LL | T: Foo<bar(..): Send, baz(..): Send>,
| ^^^^^^^^^^^^^
error: return type notation is not allowed for functions that have const parameters
--> $DIR/ty-or-ct-params.rs:14:27
--> $DIR/ty-or-ct-params.rs:13:27
|
LL | async fn baz<const N: usize>() {}
| -------------- const parameter declared here
@ -25,5 +16,5 @@ LL | async fn baz<const N: usize>() {}
LL | T: Foo<bar(..): Send, baz(..): Send>,
| ^^^^^^^^^^^^^
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 2 previous errors

View File

@ -1,7 +1,6 @@
//@ check-pass
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
fn borrow(&mut self) -> impl Sized + '_;

View File

@ -1,11 +0,0 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/rtn-static.rs:3:12
|
LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: 1 warning emitted