diff --git a/tests/ui/never_type/impl_trait_fallback.rs b/tests/ui/never_type/impl_trait_fallback.rs deleted file mode 100644 index dafbd5af9a1e..000000000000 --- a/tests/ui/never_type/impl_trait_fallback.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ check-pass -#![expect(dependency_on_unit_never_type_fallback)] - -fn main() {} - -trait T {} -impl T for () {} - -fn should_ret_unit() -> impl T { - panic!() -} diff --git a/tests/ui/never_type/impl_trait_fallback.stderr b/tests/ui/never_type/impl_trait_fallback.stderr deleted file mode 100644 index bdf6df987832..000000000000 --- a/tests/ui/never_type/impl_trait_fallback.stderr +++ /dev/null @@ -1,14 +0,0 @@ -Future incompatibility report: Future breakage diagnostic: -warning: this function depends on never type fallback being `()` - --> $DIR/impl_trait_fallback.rs:9:1 - | -LL | fn should_ret_unit() -> impl T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: specify the types explicitly -note: in edition 2024, the requirement `!: T` will fail - --> $DIR/impl_trait_fallback.rs:9:25 - | -LL | fn should_ret_unit() -> impl T { - | ^^^^^^ - diff --git a/tests/ui/never_type/impl_trait_fallback2.rs b/tests/ui/never_type/impl_trait_fallback2.rs deleted file mode 100644 index c7c624bdce6e..000000000000 --- a/tests/ui/never_type/impl_trait_fallback2.rs +++ /dev/null @@ -1,25 +0,0 @@ -//@ edition:2015..2021 -#![feature(type_alias_impl_trait)] - -fn main() {} - -trait T {} -impl T for i32 {} - -fn should_ret_unit() -> impl T { - //~^ ERROR `(): T` is not satisfied - panic!() -} - -type Foo = impl T; - -#[define_opaque(Foo)] -fn a() -> Foo { - //~^ ERROR `(): T` is not satisfied - panic!() -} - -#[define_opaque(Foo)] -fn b() -> Foo { - 42 -} diff --git a/tests/ui/never_type/impl_trait_fallback2.stderr b/tests/ui/never_type/impl_trait_fallback2.stderr deleted file mode 100644 index c23b39590a3f..000000000000 --- a/tests/ui/never_type/impl_trait_fallback2.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0277]: the trait bound `(): T` is not satisfied - --> $DIR/impl_trait_fallback2.rs:9:25 - | -LL | fn should_ret_unit() -> impl T { - | ^^^^^^ the trait `T` is not implemented for `()` -LL | -LL | panic!() - | -------- return type was inferred to be `_` here - | -help: the trait `T` is implemented for `i32` - --> $DIR/impl_trait_fallback2.rs:7:1 - | -LL | impl T for i32 {} - | ^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `(): T` is not satisfied - --> $DIR/impl_trait_fallback2.rs:17:11 - | -LL | fn a() -> Foo { - | ^^^ the trait `T` is not implemented for `()` -LL | -LL | panic!() - | -------- return type was inferred to be `_` here - | -help: the trait `T` is implemented for `i32` - --> $DIR/impl_trait_fallback2.rs:7:1 - | -LL | impl T for i32 {} - | ^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/impl_trait_fallback3.rs b/tests/ui/never_type/impl_trait_fallback3.rs deleted file mode 100644 index 03cd6fc25c2b..000000000000 --- a/tests/ui/never_type/impl_trait_fallback3.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ edition:2015..2021 -#![feature(type_alias_impl_trait)] - -fn main() {} - -trait T { - type Assoc; -} - -type Foo = impl T; - -#[define_opaque(Foo)] -fn a() -> Foo { - //~^ ERROR the trait bound `(): T` is not satisfied - // This is not a defining use, it doesn't actually constrain the opaque type. - panic!() -} diff --git a/tests/ui/never_type/impl_trait_fallback3.stderr b/tests/ui/never_type/impl_trait_fallback3.stderr deleted file mode 100644 index 259aea18d688..000000000000 --- a/tests/ui/never_type/impl_trait_fallback3.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `(): T` is not satisfied - --> $DIR/impl_trait_fallback3.rs:13:11 - | -LL | fn a() -> Foo { - | ^^^ the trait `T` is not implemented for `()` -... -LL | panic!() - | -------- return type was inferred to be `_` here - | -help: this trait has no implementations, consider adding one - --> $DIR/impl_trait_fallback3.rs:6:1 - | -LL | trait T { - | ^^^^^^^ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/impl_trait_fallback4.rs b/tests/ui/never_type/impl_trait_fallback4.rs deleted file mode 100644 index 52ddd74f9161..000000000000 --- a/tests/ui/never_type/impl_trait_fallback4.rs +++ /dev/null @@ -1,26 +0,0 @@ -//@ edition:2015..2021 -#![feature(type_alias_impl_trait)] - -trait T { - type Assoc: Cake; -} - -trait Cake: std::fmt::Display { - fn cake() -> Self; -} - -type Foo = impl T; - -fn foo() -> impl T { - //~^ ERROR `(): T` is not satisfied - panic!() -} - -#[define_opaque(Foo)] -fn a() -> Foo { - foo() -} - -fn main() { - println!("{}", ::Assoc::cake()); -} diff --git a/tests/ui/never_type/impl_trait_fallback4.stderr b/tests/ui/never_type/impl_trait_fallback4.stderr deleted file mode 100644 index f9de4b6a4944..000000000000 --- a/tests/ui/never_type/impl_trait_fallback4.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `(): T` is not satisfied - --> $DIR/impl_trait_fallback4.rs:14:13 - | -LL | fn foo() -> impl T { - | ^^^^^^ the trait `T` is not implemented for `()` -LL | -LL | panic!() - | -------- return type was inferred to be `_` here - | -help: this trait has no implementations, consider adding one - --> $DIR/impl_trait_fallback4.rs:4:1 - | -LL | trait T { - | ^^^^^^^ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`.