From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- .../coinduction/fixpoint-exponential-growth.rs | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs (limited to 'tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs') 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: Trait` instantiates `?0` with `(W, W)` and then -// proves `W: Trait` and `W: 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); - -impl Trait for W<(W, W)> -where - W: Trait, - W: Trait, -{ -} - -fn impls() {} - -fn main() { - impls::>(); - //~^ ERROR overflow evaluating the requirement -} -- cgit v1.2.3