Skip to content

Commit 169e81c

Browse files
committed
Move an ACE test out of the GCI directory
1 parent 40daf23 commit 169e81c

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)