We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 125e0ae + 5f75e71 commit c864468Copy full SHA for c864468
src/test/ui/const-generics/ice-68875.rs
@@ -0,0 +1,11 @@
1
+// check-fail
2
+
3
+struct DataWrapper<'a> {
4
+ data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants
5
+}
6
7
+impl DataWrapper<'_> {
8
+ const SIZE: usize = 14;
9
10
11
+pub fn main() {}
src/test/ui/const-generics/ice-68875.stderr
@@ -0,0 +1,8 @@
+error: generic `Self` types are currently not permitted in anonymous constants
+ --> $DIR/ice-68875.rs:4:20
+ |
+LL | data: &'a [u8; Self::SIZE],
+ | ^^^^
+error: aborting due to previous error
0 commit comments