Rollup merge of #117516 - matthiaskrgr:test_effects_113375_oob, r=fee1-dead

add test for #113375

Fixes #113375

r? `@fee1-dead`
This commit is contained in:
Matthias Krüger 2023-11-06 20:31:55 +01:00 committed by GitHub
commit 8a34fea835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,18 @@
// 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() {}