remove useless tests

they don't detect any bugs in the search graph. We instead check
for these via `search_graph_fuzz`.
This commit is contained in:
lcnr 2025-02-17 15:25:06 +01:00
parent 933d45fe8f
commit a7970c0b27
8 changed files with 0 additions and 238 deletions

View file

@ -1,37 +0,0 @@
//@ compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// Test that having both an inductive and a coinductive cycle
// is handled correctly.
#[rustc_coinductive]
trait Trait {}
impl<T: Inductive + Coinductive> Trait for T {}
trait Inductive {}
impl<T: Trait> Inductive for T {}
#[rustc_coinductive]
trait Coinductive {}
impl<T: Trait> Coinductive for T {}
fn impls_trait<T: Trait>() {}
#[rustc_coinductive]
trait TraitRev {}
impl<T: CoinductiveRev + InductiveRev> TraitRev for T {}
trait InductiveRev {}
impl<T: TraitRev> InductiveRev for T {}
#[rustc_coinductive]
trait CoinductiveRev {}
impl<T: TraitRev> CoinductiveRev for T {}
fn impls_trait_rev<T: TraitRev>() {}
fn main() {
impls_trait::<()>();
//~^ ERROR overflow evaluating the requirement
impls_trait_rev::<()>();
//~^ ERROR overflow evaluating the requirement
}

View file

@ -1,27 +0,0 @@
error[E0275]: overflow evaluating the requirement `(): Trait`
--> $DIR/double-cycle-inductive-coinductive.rs:32:19
|
LL | impls_trait::<()>();
| ^^
|
note: required by a bound in `impls_trait`
--> $DIR/double-cycle-inductive-coinductive.rs:17:19
|
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`
error[E0275]: overflow evaluating the requirement `(): TraitRev`
--> $DIR/double-cycle-inductive-coinductive.rs:35:23
|
LL | impls_trait_rev::<()>();
| ^^
|
note: required by a bound in `impls_trait_rev`
--> $DIR/double-cycle-inductive-coinductive.rs:29:23
|
LL | fn impls_trait_rev<T: TraitRev>() {}
| ^^^^^^^^ required by this bound in `impls_trait_rev`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0275`.

View file

@ -1,46 +0,0 @@
//@ compile-flags: -Znext-solver
#![feature(rustc_attrs, trivial_bounds)]
// We have to be careful here:
//
// We either have the provisional result of `A -> B -> A` on the
// stack, which is a fully coinductive cycle. Accessing the
// provisional result for `B` as part of the `A -> C -> B -> A` cycle
// has to make sure we don't just use the result of `A -> B -> A` as the
// new cycle is inductive.
//
// Alternatively, if we have `A -> C -> A` first, then `A -> B -> A` has
// a purely inductive stack, so something could also go wrong here.
#[rustc_coinductive]
trait A {}
#[rustc_coinductive]
trait B {}
trait C {}
impl<T: B + C> A for T {}
impl<T: A> B for T {}
impl<T: B> C for T {}
fn impls_a<T: A>() {}
// The same test with reordered where clauses to make sure we're actually testing anything.
#[rustc_coinductive]
trait AR {}
#[rustc_coinductive]
trait BR {}
trait CR {}
impl<T: CR + BR> AR for T {}
impl<T: AR> BR for T {}
impl<T: BR> CR for T {}
fn impls_ar<T: AR>() {}
fn main() {
impls_a::<()>();
//~^ ERROR overflow evaluating the requirement `(): A`
impls_ar::<()>();
//~^ ERROR overflow evaluating the requirement `(): AR`
}

View file

@ -1,27 +0,0 @@
error[E0275]: overflow evaluating the requirement `(): A`
--> $DIR/inductive-not-on-stack.rs:41:15
|
LL | impls_a::<()>();
| ^^
|
note: required by a bound in `impls_a`
--> $DIR/inductive-not-on-stack.rs:25:15
|
LL | fn impls_a<T: A>() {}
| ^ required by this bound in `impls_a`
error[E0275]: overflow evaluating the requirement `(): AR`
--> $DIR/inductive-not-on-stack.rs:44:16
|
LL | impls_ar::<()>();
| ^^
|
note: required by a bound in `impls_ar`
--> $DIR/inductive-not-on-stack.rs:38:16
|
LL | fn impls_ar<T: AR>() {}
| ^^ required by this bound in `impls_ar`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0275`.

View file

@ -1,39 +0,0 @@
//@ compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// A test intended to check how we handle provisional results
// for a goal computed with an inductive and a coinductive stack.
//
// Unfortunately this doesn't really detect whether we've done
// something wrong but instead only showcases that we thought of
// this.
//
// FIXME(-Znext-solver=coinductive): With the new coinduction approach
// the same goal stack can be both inductive and coinductive, depending
// on why we're proving a specific nested goal. Rewrite this test
// at that point instead of relying on `BInd`.
#[rustc_coinductive]
trait A {}
#[rustc_coinductive]
trait B {}
trait BInd {}
impl<T: ?Sized + B> BInd for T {}
#[rustc_coinductive]
trait C {}
trait CInd {}
impl<T: ?Sized + C> CInd for T {}
impl<T: ?Sized + BInd + C> A for T {}
impl<T: ?Sized + CInd + C> B for T {}
impl<T: ?Sized + B + A> C for T {}
fn impls_a<T: A>() {}
fn main() {
impls_a::<()>();
//~^ ERROR overflow evaluating the requirement `(): A`
}

View file

@ -1,15 +0,0 @@
error[E0275]: overflow evaluating the requirement `(): A`
--> $DIR/mixed-cycles-1.rs:37:15
|
LL | impls_a::<()>();
| ^^
|
note: required by a bound in `impls_a`
--> $DIR/mixed-cycles-1.rs:34:15
|
LL | fn impls_a<T: A>() {}
| ^ required by this bound in `impls_a`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.

View file

@ -1,32 +0,0 @@
//@ compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// A test showcasing that the solver may need to
// compute a goal which is already in the provisional
// cache.
//
// However, given that `(): BInd` and `(): B` are currently distinct
// goals, this is actually not possible right now.
//
// FIXME(-Znext-solver=coinductive): With the new coinduction approach
// the same goal stack can be both inductive and coinductive, depending
// on why we're proving a specific nested goal. Rewrite this test
// at that point.
#[rustc_coinductive]
trait A {}
#[rustc_coinductive]
trait B {}
trait BInd {}
impl<T: ?Sized + B> BInd for T {}
impl<T: ?Sized + BInd + B> A for T {}
impl<T: ?Sized + BInd> B for T {}
fn impls_a<T: A>() {}
fn main() {
impls_a::<()>();
//~^ ERROR overflow evaluating the requirement `(): A`
}

View file

@ -1,15 +0,0 @@
error[E0275]: overflow evaluating the requirement `(): A`
--> $DIR/mixed-cycles-2.rs:30:15
|
LL | impls_a::<()>();
| ^^
|
note: required by a bound in `impls_a`
--> $DIR/mixed-cycles-2.rs:27:15
|
LL | fn impls_a<T: A>() {}
| ^ required by this bound in `impls_a`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.