-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #108880 - spastorino:new-rpitit-6, r=compiler-errors
Remove tests/ui/impl-trait/in-trait/new-lowering-strategy in favor of using revisions on existing tests r? `@compiler-errors` This one again sits on top of existing approved PRs and it still needs to add revisions to tests in `tests/ui/impl-trait/in-trait` as it only does so for async in traits.
- Loading branch information
Showing
50 changed files
with
236 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...c-example-desugared-boxed-in-trait.stderr → ...e-desugared-boxed-in-trait.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error[E0053]: method `foo` has an incompatible type for trait | ||
--> $DIR/async-example-desugared-boxed-in-trait.rs:17:28 | ||
| | ||
LL | async fn foo(&self) -> i32 { | ||
| ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future | ||
| | ||
note: type in trait | ||
--> $DIR/async-example-desugared-boxed-in-trait.rs:13:22 | ||
| | ||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>` | ||
found signature `fn(&i32) -> impl Future<Output = i32>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0053`. |
2 changes: 2 additions & 0 deletions
2
tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rait/async-example-desugared-boxed.stderr → ...nc-example-desugared-boxed.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/ui/async-await/in-trait/async-example-desugared-boxed.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: method `foo` should be async because the method from the trait is async | ||
--> $DIR/async-example-desugared-boxed.rs:17:5 | ||
| | ||
LL | async fn foo(&self) -> i32; | ||
| --------------------------- required because the trait method is async | ||
... | ||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
2 changes: 2 additions & 0 deletions
2
tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/ui/async-await/in-trait/async-example-desugared-extra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ait/async-example-desugared-manual.stderr → ...c-example-desugared-manual.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/ui/async-await/in-trait/async-example-desugared-manual.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: method `foo` should be async because the method from the trait is async | ||
--> $DIR/async-example-desugared-manual.rs:25:5 | ||
| | ||
LL | async fn foo(&self) -> i32; | ||
| --------------------------- required because the trait method is async | ||
... | ||
LL | fn foo(&self) -> MyFuture { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
2 changes: 2 additions & 0 deletions
2
tests/ui/async-await/in-trait/async-example-desugared-manual.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...t/in-trait/async-recursive-generic.stderr → ...it/async-recursive-generic.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/ui/async-await/in-trait/async-recursive-generic.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0733]: recursion in an `async fn` requires boxing | ||
--> $DIR/async-recursive-generic.rs:13:48 | ||
| | ||
LL | async fn foo_recursive(&self, n: usize) -> T { | ||
| ^ recursive `async fn` | ||
| | ||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future` | ||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0733`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ync-await/in-trait/async-recursive.stderr → ...t/in-trait/async-recursive.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0733]: recursion in an `async fn` requires boxing | ||
--> $DIR/async-recursive.rs:13:48 | ||
| | ||
LL | async fn foo_recursive(&self, n: usize) -> i32 { | ||
| ^^^ recursive `async fn` | ||
| | ||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future` | ||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0733`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: expected identifier, found keyword `self` | ||
--> $DIR/bad-signatures.rs:9: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 | ||
| | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...c-await/in-trait/fn-not-async-err2.stderr → ...in-trait/fn-not-async-err2.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types | ||
--> $DIR/fn-not-async-err2.rs:15:22 | ||
| | ||
LL | fn foo(&self) -> impl Future<Output = i32> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information | ||
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../ui/impl-trait/in-trait/deep-match.stderr → ...-trait/in-trait/deep-match.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0053]: method `bar` has an incompatible return type for trait | ||
--> $DIR/deep-match.rs:14:17 | ||
| | ||
LL | fn bar() -> i32 { | ||
| ^^^ | ||
| | | ||
| expected `Wrapper<_>`, found `i32` | ||
| return type in trait | ||
| | ||
= note: expected struct `Wrapper<_>` | ||
found type `i32` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0053`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ait/default-method-binder-shifting.stderr → ...ult-method-binder-shifting.current.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/ui/impl-trait/in-trait/default-method-binder-shifting.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/default-method-binder-shifting.rs:5:12 | ||
| | ||
LL | #![feature(return_position_impl_trait_in_trait)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
2 changes: 2 additions & 0 deletions
2
tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.