Skip to content

Commit 95469dc

Browse files
No longer mark RTN as incomplete
1 parent 4ae36d9 commit 95469dc

File tree

64 files changed

+77
-430
lines changed

Some content is hidden

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

64 files changed

+77
-430
lines changed

compiler/rustc_feature/src/unstable.rs

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

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

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ edition: 2021
22

33
#![feature(return_type_notation)]
4-
//~^ WARN the feature `return_type_notation` is incomplete
54

65
trait Trait {
76
async fn method() {}
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,57 @@
11
error[E0575]: expected associated type, found associated function `Trait::method`
2-
--> $DIR/bad-inputs-and-output.rs:28:36
2+
--> $DIR/bad-inputs-and-output.rs:27:36
33
|
44
LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
66

77
error[E0575]: expected associated type, found associated function `Trait::method`
8-
--> $DIR/bad-inputs-and-output.rs:31:36
8+
--> $DIR/bad-inputs-and-output.rs:30:36
99
|
1010
LL | fn bar_qualified<T: Trait>() where <T as Trait>::method() -> (): Send {}
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
1212

1313
error[E0575]: expected associated type, found associated function `Trait::method`
14-
--> $DIR/bad-inputs-and-output.rs:34:36
14+
--> $DIR/bad-inputs-and-output.rs:33:36
1515
|
1616
LL | fn baz_qualified<T: Trait>() where <T as Trait>::method(): Send {}
1717
| ^^^^^^^^^^^^^^^^^^^^^^ not a associated type
1818

19-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
20-
--> $DIR/bad-inputs-and-output.rs:3:12
21-
|
22-
LL | #![feature(return_type_notation)]
23-
| ^^^^^^^^^^^^^^^^^^^^
24-
|
25-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
26-
= note: `#[warn(incomplete_features)]` on by default
27-
2819
error: argument types not allowed with return type notation
29-
--> $DIR/bad-inputs-and-output.rs:10:23
20+
--> $DIR/bad-inputs-and-output.rs:9:23
3021
|
3122
LL | fn foo<T: Trait<method(i32): Send>>() {}
3223
| ^^^^^ help: remove the input types: `()`
3324

3425
error: return type not allowed with return type notation
35-
--> $DIR/bad-inputs-and-output.rs:13:25
26+
--> $DIR/bad-inputs-and-output.rs:12:25
3627
|
3728
LL | fn bar<T: Trait<method() -> (): Send>>() {}
3829
| ^^^^^^ help: remove the return type
3930

4031
error: return type notation arguments must be elided with `..`
41-
--> $DIR/bad-inputs-and-output.rs:16:23
32+
--> $DIR/bad-inputs-and-output.rs:15:23
4233
|
4334
LL | fn baz<T: Trait<method(): Send>>() {}
4435
| ^^ help: add `..`: `(..)`
4536

4637
error: argument types not allowed with return type notation
47-
--> $DIR/bad-inputs-and-output.rs:19:40
38+
--> $DIR/bad-inputs-and-output.rs:18:40
4839
|
4940
LL | fn foo_path<T: Trait>() where T::method(i32): Send {}
5041
| ^^^^^ help: remove the input types: `()`
5142

5243
error: return type not allowed with return type notation
53-
--> $DIR/bad-inputs-and-output.rs:22:42
44+
--> $DIR/bad-inputs-and-output.rs:21:42
5445
|
5546
LL | fn bar_path<T: Trait>() where T::method() -> (): Send {}
5647
| ^^^^^^ help: remove the return type
5748

5849
error: return type notation arguments must be elided with `..`
59-
--> $DIR/bad-inputs-and-output.rs:25:40
50+
--> $DIR/bad-inputs-and-output.rs:24:40
6051
|
6152
LL | fn baz_path<T: Trait>() where T::method(): Send {}
6253
| ^^ help: add `..`: `(..)`
6354

64-
error: aborting due to 9 previous errors; 1 warning emitted
55+
error: aborting due to 9 previous errors
6556

6657
For more information about this error, try `rustc --explain E0575`.

tests/ui/associated-type-bounds/return-type-notation/bare-path.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(return_type_notation)]
2-
//~^ WARN the feature `return_type_notation` is incomplete
32

43
trait Tr {
54
const CONST: usize;
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/bare-path.rs:1:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error: return type notation not allowed in this position yet
11-
--> $DIR/bare-path.rs:15:23
2+
--> $DIR/bare-path.rs:14:23
123
|
134
LL | let _ = T::CONST::(..);
145
| ^^^^
156

167
error: return type notation not allowed in this position yet
17-
--> $DIR/bare-path.rs:17:12
8+
--> $DIR/bare-path.rs:16:12
189
|
1910
LL | let _: T::method(..);
2011
| ^^^^^^^^^^^^^
2112

22-
error: aborting due to 2 previous errors; 1 warning emitted
13+
error: aborting due to 2 previous errors
2314

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//@ [with] check-pass
44

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

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

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

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/basic.rs:5:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error: future cannot be sent between threads safely
11-
--> $DIR/basic.rs:23:13
2+
--> $DIR/basic.rs:22:13
123
|
134
LL | is_send(foo::<T>());
145
| ^^^^^^^^^^ future returned by `foo` is not `Send`
156
|
167
= 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`
178
note: future is not `Send` as it awaits another future which is not `Send`
18-
--> $DIR/basic.rs:13:5
9+
--> $DIR/basic.rs:12:5
1910
|
2011
LL | T::method().await?;
2112
| ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`, which is not `Send`
2213
note: required by a bound in `is_send`
23-
--> $DIR/basic.rs:17:20
14+
--> $DIR/basic.rs:16:20
2415
|
2516
LL | fn is_send(_: impl Send) {}
2617
| ^^^^ required by this bound in `is_send`
2718

28-
error: aborting due to 1 previous error; 1 warning emitted
19+
error: aborting due to 1 previous error
2920

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

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(return_type_notation)]
2-
//~^ WARN the feature `return_type_notation` is incomplete
32

43
trait Trait {}
54
fn needs_trait(_: impl Trait) {}
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,69 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/display.rs:1:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error[E0277]: the trait bound `impl Sized { <T as Assoc>::method(..) }: Trait` is not satisfied
11-
--> $DIR/display.rs:15:17
2+
--> $DIR/display.rs:14:17
123
|
134
LL | needs_trait(T::method());
145
| ----------- ^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method(..) }`
156
| |
167
| required by a bound introduced by this call
178
|
189
note: required by a bound in `needs_trait`
19-
--> $DIR/display.rs:5:24
10+
--> $DIR/display.rs:4:24
2011
|
2112
LL | fn needs_trait(_: impl Trait) {}
2213
| ^^^^^ required by this bound in `needs_trait`
2314

2415
error[E0277]: the trait bound `impl Sized { <T as Assoc>::method_with_lt(..) }: Trait` is not satisfied
25-
--> $DIR/display.rs:17:17
16+
--> $DIR/display.rs:16:17
2617
|
2718
LL | needs_trait(T::method_with_lt());
2819
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method_with_lt(..) }`
2920
| |
3021
| required by a bound introduced by this call
3122
|
3223
note: required by a bound in `needs_trait`
33-
--> $DIR/display.rs:5:24
24+
--> $DIR/display.rs:4:24
3425
|
3526
LL | fn needs_trait(_: impl Trait) {}
3627
| ^^^^^ required by this bound in `needs_trait`
3728

3829
error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
39-
--> $DIR/display.rs:19:17
30+
--> $DIR/display.rs:18:17
4031
|
4132
LL | needs_trait(T::method_with_ty());
4233
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
4334
| |
4435
| required by a bound introduced by this call
4536
|
4637
help: this trait has no implementations, consider adding one
47-
--> $DIR/display.rs:4:1
38+
--> $DIR/display.rs:3:1
4839
|
4940
LL | trait Trait {}
5041
| ^^^^^^^^^^^
5142
note: required by a bound in `needs_trait`
52-
--> $DIR/display.rs:5:24
43+
--> $DIR/display.rs:4:24
5344
|
5445
LL | fn needs_trait(_: impl Trait) {}
5546
| ^^^^^ required by this bound in `needs_trait`
5647

5748
error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
58-
--> $DIR/display.rs:21:17
49+
--> $DIR/display.rs:20:17
5950
|
6051
LL | needs_trait(T::method_with_ct());
6152
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
6253
| |
6354
| required by a bound introduced by this call
6455
|
6556
help: this trait has no implementations, consider adding one
66-
--> $DIR/display.rs:4:1
57+
--> $DIR/display.rs:3:1
6758
|
6859
LL | trait Trait {}
6960
| ^^^^^^^^^^^
7061
note: required by a bound in `needs_trait`
71-
--> $DIR/display.rs:5:24
62+
--> $DIR/display.rs:4:24
7263
|
7364
LL | fn needs_trait(_: impl Trait) {}
7465
| ^^^^^ required by this bound in `needs_trait`
7566

76-
error: aborting due to 4 previous errors; 1 warning emitted
67+
error: aborting due to 4 previous errors
7768

7869
For more information about this error, try `rustc --explain E0277`.

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

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ edition: 2021
22

33
#![feature(return_type_notation)]
4-
//~^ WARN the feature `return_type_notation` is incomplete
54

65
use std::future::Future;
76

Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/equality.rs:3:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error: return type notation is not allowed to use type equality
11-
--> $DIR/equality.rs:12:18
2+
--> $DIR/equality.rs:11:18
123
|
134
LL | fn test<T: Trait<method(..) = Box<dyn Future<Output = ()>>>>() {}
145
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156

16-
error: aborting due to 1 previous error; 1 warning emitted
7+
error: aborting due to 1 previous error
178

tests/ui/associated-type-bounds/return-type-notation/higher-ranked-bound-works.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ check-pass
22

33
#![feature(return_type_notation)]
4-
//~^ WARN the feature `return_type_notation` is incomplete
54

65
trait Trait<'a> {
76
fn late<'b>(&'b self, _: &'a ()) -> impl Sized;

tests/ui/associated-type-bounds/return-type-notation/higher-ranked-bound-works.stderr

-11
This file was deleted.

tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ edition: 2021
22

33
#![feature(return_type_notation)]
4-
//~^ WARN the feature `return_type_notation` is incomplete
54

65
trait HealthCheck {
76
async fn check<const N: usize>() -> bool;
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/issue-120208-higher-ranked-const.rs:3:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error: return type notation is not allowed for functions that have const parameters
11-
--> $DIR/issue-120208-higher-ranked-const.rs:12:21
2+
--> $DIR/issue-120208-higher-ranked-const.rs:11:21
123
|
134
LL | async fn check<const N: usize>() -> bool;
145
| -------------- const parameter declared here
156
...
167
LL | HC: HealthCheck<check(..): Send> + Send + 'static,
178
| ^^^^^^^^^^^^^^^
189

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

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

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ edition: 2021
22

33
#![feature(return_type_notation)]
4-
//~^ WARN the feature `return_type_notation` is incomplete
54

65
trait Trait {
76
async fn method() {}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/missing.rs:3:12
3-
|
4-
LL | #![feature(return_type_notation)]
5-
| ^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8-
= note: `#[warn(incomplete_features)]` on by default
9-
101
error[E0220]: associated function `methid` not found for `Trait`
11-
--> $DIR/missing.rs:10:17
2+
--> $DIR/missing.rs:9:17
123
|
134
LL | fn bar<T: Trait<methid(..): Send>>() {}
145
| ^^^^^^ help: there is an associated function with a similar name: `method`
156

16-
error: aborting due to 1 previous error; 1 warning emitted
7+
error: aborting due to 1 previous error
178

189
For more information about this error, try `rustc --explain E0220`.

tests/ui/associated-type-bounds/return-type-notation/namespace-conflict.rs

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

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

76
trait Foo {
87
type test;

0 commit comments

Comments
 (0)