about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-02-17 15:25:06 +0100
committerlcnr <rust@lcnr.de>2025-02-28 12:16:47 +0100
commita7970c0b271b3fc4c19f580977a44c46130c077a (patch)
tree1bc775ca298367869e22abce23cba2c1d0dd7f0c
parent933d45fe8f29904f315161b9c42b96a72e3eefb4 (diff)
downloadrust-a7970c0b271b3fc4c19f580977a44c46130c077a.tar.gz
rust-a7970c0b271b3fc4c19f580977a44c46130c077a.zip
remove useless tests
they don't detect any bugs in the search graph. We instead check
for these via `search_graph_fuzz`.
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs37
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr27
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs46
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr27
-rw-r--r--tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs39
-rw-r--r--tests/ui/traits/next-solver/cycles/mixed-cycles-1.stderr15
-rw-r--r--tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs32
-rw-r--r--tests/ui/traits/next-solver/cycles/mixed-cycles-2.stderr15
8 files changed, 0 insertions, 238 deletions
diff --git a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
deleted file mode 100644
index 0d387214208..00000000000
--- a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
+++ /dev/null
@@ -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
-}
diff --git a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
deleted file mode 100644
index 7cedb4d36c9..00000000000
--- a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
+++ /dev/null
@@ -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`.
diff --git a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
deleted file mode 100644
index 78683372580..00000000000
--- a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
+++ /dev/null
@@ -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`
-}
diff --git a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
deleted file mode 100644
index e9cc6bc6c81..00000000000
--- a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
+++ /dev/null
@@ -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`.
diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs
deleted file mode 100644
index 6d75d241864..00000000000
--- a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs
+++ /dev/null
@@ -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`
-}
diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.stderr b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.stderr
deleted file mode 100644
index 17544eb1da5..00000000000
--- a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.stderr
+++ /dev/null
@@ -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`.
diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs
deleted file mode 100644
index c939a6e5ef2..00000000000
--- a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs
+++ /dev/null
@@ -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`
-}
diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.stderr b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.stderr
deleted file mode 100644
index a9be1016c74..00000000000
--- a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.stderr
+++ /dev/null
@@ -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`.