Skip to content

Commit 06987ca

Browse files
authored
Unrolled build for #143056
Rollup merge of #143056 - fmease:mv-ace-test-out-of-gci-dir, r=BoxyUwU Move an ACE test out of the GCI directory In #122988, a test pertaining to `associated_const_equality` was placed into the directory meant for `generic_const_items`. Let's move it where it belongs. While at it, I took the time to further minimize the test and to add a description. You can use 1.67.1 (as reported in #108220) to verify that I didn't butcher it. For additional context, the issue was likely fixed in #112718 (but I'm also cc'ing #140467 which further fixed things up and has more context). I only performed quick and dirty git/GitHub archeology, so I don't have the full picture here. For one, I'm not even sure if this regression test is worth it. Anyway, I just want it gone from the GCI dir :)
2 parents 513999b + 169e81c commit 06987ca

File tree

2 files changed

+17
-35
lines changed

2 files changed

+17
-35
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// The impl of lint `const_evaluatable_unchecked` used to wrongly assume and `assert!` that
2+
// successfully evaluating a type-system constant that has non-region args had to be an anon const.
3+
// In the case below however we have a type-system assoc const (here: `<() as TraitA<T>>::K`).
4+
//
5+
// issue: <https://github.com/rust-lang/rust/issues/108220>
6+
//@ check-pass
7+
#![feature(associated_const_equality)]
8+
9+
pub trait TraitA<T> { const K: u8 = 0; }
10+
pub trait TraitB<T> {}
11+
12+
impl<T> TraitA<T> for () {}
13+
impl<T> TraitB<T> for () where (): TraitA<T, K = 0> {}
14+
15+
fn check<T>() where (): TraitB<T> {}
16+
17+
fn main() {}

tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)