summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs18
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 000000000..1954d2942
--- /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() {}