Skip to content

Commit 8d1d88b

Browse files
committed
ui: add test for normalizing const projections with assoc const equality
1 parent 1279939 commit 8d1d88b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@ check-pass
2+
#![feature(min_generic_const_args)]
3+
#![allow(incomplete_features)]
4+
5+
// Regression test for normalizing const projections
6+
// with associated const equality bounds.
7+
8+
trait Trait {
9+
#[type_const]
10+
const C: usize;
11+
}
12+
13+
fn f<T: Trait<C = 1>>() {
14+
// This must normalize <T as Trait>::C to 1
15+
let _: [(); T::C] = [()];
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)