remove outdated tests

I don't think they are testing anything anymore
This commit is contained in:
Waffle Lapkin 2025-11-13 23:05:54 +01:00
parent 8c8d930714
commit 109b6de8fc
No known key found for this signature in database
8 changed files with 0 additions and 162 deletions

View file

@ -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!()
}

View file

@ -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 {
| ^^^^^^

View file

@ -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
}

View file

@ -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`.

View file

@ -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!()
}

View file

@ -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`.

View file

@ -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!("{}", <Foo as T>::Assoc::cake());
}

View file

@ -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`.