From 2ca350c776414fb09ca97311b5e0fee929c90902 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 21 Mar 2023 16:52:15 -0300 Subject: [PATCH] Bless some extra working tests under -Zlower-impl-trait-in-trait-to-assoc-ty --- tests/ui/impl-trait/in-trait/nested-rpitit.rs | 2 ++ ...052-2.stderr => issue-103052-2.current.stderr} | 4 ++-- .../issue-103052-2.next.stderr | 15 +++++++++++++++ .../rfc-1937-termination-trait/issue-103052-2.rs | 6 +++++- 4 files changed, 24 insertions(+), 3 deletions(-) rename tests/ui/rfc-1937-termination-trait/{issue-103052-2.stderr => issue-103052-2.current.stderr} (88%) create mode 100644 tests/ui/rfc-1937-termination-trait/issue-103052-2.next.stderr diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit.rs b/tests/ui/impl-trait/in-trait/nested-rpitit.rs index 65285e3a3cc..36020753726 100644 --- a/tests/ui/impl-trait/in-trait/nested-rpitit.rs +++ b/tests/ui/impl-trait/in-trait/nested-rpitit.rs @@ -1,4 +1,6 @@ // check-pass +// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty +// revisions: current next #![feature(return_position_impl_trait_in_trait)] #![allow(incomplete_features)] diff --git a/tests/ui/rfc-1937-termination-trait/issue-103052-2.stderr b/tests/ui/rfc-1937-termination-trait/issue-103052-2.current.stderr similarity index 88% rename from tests/ui/rfc-1937-termination-trait/issue-103052-2.stderr rename to tests/ui/rfc-1937-termination-trait/issue-103052-2.current.stderr index a700c72ea68..f72b3ab0234 100644 --- a/tests/ui/rfc-1937-termination-trait/issue-103052-2.stderr +++ b/tests/ui/rfc-1937-termination-trait/issue-103052-2.current.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `Something: Termination` is not satisfied - --> $DIR/issue-103052-2.rs:12:22 + --> $DIR/issue-103052-2.rs:15:22 | LL | fn main() -> Something { | ^^^^^^^^^ the trait `Termination` is not implemented for `Something` | note: required by a bound in `Main::main::{opaque#0}` - --> $DIR/issue-103052-2.rs:6:27 + --> $DIR/issue-103052-2.rs:9:27 | LL | fn main() -> impl std::process::Termination; | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::main::{opaque#0}` diff --git a/tests/ui/rfc-1937-termination-trait/issue-103052-2.next.stderr b/tests/ui/rfc-1937-termination-trait/issue-103052-2.next.stderr new file mode 100644 index 00000000000..8b01941b4c6 --- /dev/null +++ b/tests/ui/rfc-1937-termination-trait/issue-103052-2.next.stderr @@ -0,0 +1,15 @@ +error[E0277]: the trait bound `Something: Termination` is not satisfied + --> $DIR/issue-103052-2.rs:15:22 + | +LL | fn main() -> Something { + | ^^^^^^^^^ the trait `Termination` is not implemented for `Something` + | +note: required by a bound in `Main::{opaque#0}` + --> $DIR/issue-103052-2.rs:9:27 + | +LL | fn main() -> impl std::process::Termination; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{opaque#0}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/rfc-1937-termination-trait/issue-103052-2.rs b/tests/ui/rfc-1937-termination-trait/issue-103052-2.rs index fa9182b6dee..ca5fa6df2a6 100644 --- a/tests/ui/rfc-1937-termination-trait/issue-103052-2.rs +++ b/tests/ui/rfc-1937-termination-trait/issue-103052-2.rs @@ -1,3 +1,6 @@ +// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty +// revisions: current next + #![feature(return_position_impl_trait_in_trait)] #![allow(incomplete_features)] @@ -9,7 +12,8 @@ mod child { struct Something; impl Main for () { - fn main() -> Something { //~ ERROR the trait bound `Something: Termination` is not satisfied + fn main() -> Something { + //~^ ERROR the trait bound `Something: Termination` is not satisfied Something } }