diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-06 20:31:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-06 20:31:55 +0100 |
| commit | 8a34fea8359b8f2d6ccc2d89bc079196bd797373 (patch) | |
| tree | 658eccecd06e3a9143f1a424592c910e0d8b847f /tests | |
| parent | 1683df7d3b2008822c63f79cc39dbd23a1e5554e (diff) | |
| parent | 666cad9a5f86c9e69e6ef0f75d85a34ad30f11d0 (diff) | |
| download | rust-8a34fea8359b8f2d6ccc2d89bc079196bd797373.tar.gz rust-8a34fea8359b8f2d6ccc2d89bc079196bd797373.zip | |
Rollup merge of #117516 - matthiaskrgr:test_effects_113375_oob, r=fee1-dead
add test for #113375 Fixes #113375 r? `@fee1-dead`
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs new file mode 100644 index 00000000000..1954d2942e0 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs @@ -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() {} |
