rust/tests/crashes/134479.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
357 B
Rust
Raw Normal View History

2025-01-03 09:52:14 +01:00
//@ 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()
}