From 222acaa23e2c0e09687b04e3243fad18f4909f30 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 29 Apr 2023 11:01:08 +0000 Subject: [PATCH] Add incremental test. --- tests/incremental/const-generic-type-cycle.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/incremental/const-generic-type-cycle.rs diff --git a/tests/incremental/const-generic-type-cycle.rs b/tests/incremental/const-generic-type-cycle.rs new file mode 100644 index 00000000000..489420d009e --- /dev/null +++ b/tests/incremental/const-generic-type-cycle.rs @@ -0,0 +1,16 @@ +// Verify that we do not ICE when we try to overwrite an anon-const's type because of a trait +// cycle. +// +// compile-flags: -Zincremental-ignore-spans +// revisions: cpass cfail + +#![feature(trait_alias)] +#![crate_type="lib"] + +#[cfg(cpass)] +trait Bar {} + +#[cfg(cfail)] +trait Bar {} + +trait BB = Bar<{ 2 + 1 }>;