summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/ice-68875.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/ice-68875.rs')
-rw-r--r--tests/ui/const-generics/ice-68875.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/const-generics/ice-68875.rs b/tests/ui/const-generics/ice-68875.rs
new file mode 100644
index 000000000..2ef7cfdbe
--- /dev/null
+++ b/tests/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() {}