diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs')
-rw-r--r-- | tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs b/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs deleted file mode 100644 index 44e763ef9..000000000 --- a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs +++ /dev/null @@ -1,31 +0,0 @@ -// compile-flags: -Ztrait-solver=next - -// Proving `W<?0>: Trait` instantiates `?0` with `(W<?1>, W<?2>)` and then -// proves `W<?1>: Trait` and `W<?2>: Trait`, resulting in a coinductive cycle. -// -// Proving coinductive cycles runs until we reach a fixpoint. This fixpoint is -// never reached here and each step doubles the amount of nested obligations. -// -// This previously caused a hang in the trait solver, see -// https://github.com/rust-lang/trait-system-refactor-initiative/issues/13. - -#![feature(rustc_attrs)] - -#[rustc_coinductive] -trait Trait {} - -struct W<T>(T); - -impl<T, U> Trait for W<(W<T>, W<U>)> -where - W<T>: Trait, - W<U>: Trait, -{ -} - -fn impls<T: Trait>() {} - -fn main() { - impls::<W<_>>(); - //~^ ERROR overflow evaluating the requirement -} |