summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/ice-68875.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/ice-68875.rs')
-rw-r--r--src/test/ui/const-generics/ice-68875.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/ice-68875.rs b/src/test/ui/const-generics/ice-68875.rs
new file mode 100644
index 000000000..2ef7cfdbe
--- /dev/null
+++ b/src/test/ui/const-generics/ice-68875.rs
@@ -0,0 +1,11 @@
+// check-fail
+
+struct DataWrapper<'a> {
+ data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants
+}
+
+impl DataWrapper<'_> {
+ const SIZE: usize = 14;
+}
+
+pub fn main() {}