about summary refs log tree commit diff
path: root/tests/crashes/134479.rs
blob: 0e4ddb2bfd56daaf1b9affd44bf599d5c9eac6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//@ known-bug: #134479
//@ compile-flags: -Csymbol-mangling-version=v0 -Cdebuginfo=1

#![feature(generic_const_exprs)]

fn main() {
    test::<2>();
}

struct Test<const N: usize>;

fn new<const N: usize>() -> Test<N>
where
    [(); N * 1]: Sized,
{
    Test
}

fn test<const N: usize>() -> Test<{ N - 1 }>
where
    [(); (N - 1) * 1]: Sized,
{
    new()
}