rust/tests/crashes/126272.rs

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

29 lines
503 B
Rust
Raw Normal View History

2024-06-16 18:38:08 +00:00
//@ known-bug: rust-lang/rust#126272
#![feature(adt_const_params)]
#![allow(incomplete_features)]
use std::marker::ConstParamTy;
#[derive(Debug, PartialEq, Eq, ConstParamTy)]
struct Foo {
value: i32,
nested: &'static Bar<std::fmt::Debug>,
}
#[derive(Debug, PartialEq, Eq, ConstParamTy)]
struct Bar<T>(T);
struct Test<const F: Foo>;
fn main() {
let x: Test<
{
Foo {
value: 3,
nested: &Bar(4),
}
},
> = Test;
}