0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-28 09:36:05 +01:00
rust/tests/crashes/129556.rs

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

27 lines
600 B
Rust
Raw Normal View History

2024-08-30 12:38:22 +02:00
//@ known-bug: rust-lang/rust#129556
#![feature(adt_const_params)]
#![feature(generic_const_exprs)]
use core::marker::ConstParamTy;
// #[derive(ConstParamTy, PartialEq, Eq)]
// struct StructOrEnum;
#[derive(ConstParamTy, PartialEq, Eq)]
enum StructOrEnum {
A,
}
trait TraitParent<const SMTH: StructOrEnum = { StructOrEnum::A }> {}
trait TraitChild<const SMTH: StructOrEnum = { StructOrEnum::A }>: TraitParent<SMTH> {}
impl TraitParent for StructOrEnum {}
// ICE occurs
impl TraitChild for StructOrEnum {}
// ICE does not occur
// impl TraitChild<{ StructOrEnum::A }> for StructOrEnum {}