rust/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs

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

19 lines
332 B
Rust
Raw Normal View History

2023-11-02 16:15:33 +01:00
// 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() {}