rust/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs
Matthias Krüger 666cad9a5f add test for #113375
Fixes #113375
2023-11-02 16:16:56 +01:00

19 lines
332 B
Rust

// check-pass
// effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds
#![allow(incomplete_features, unused)]
#![feature(effects, adt_const_params)]
struct Bar<T>(T);
impl<T> Bar<T> {
const fn value() -> usize {
42
}
}
struct Foo<const N: [u8; Bar::<u32>::value()]>;
pub fn main() {}