We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 57c683a + c9f2865 commit 943c6c7Copy full SHA for 943c6c7
src/test/ui/associated-types/issue-47814.rs
@@ -0,0 +1,13 @@
1
+struct ArpIPv4<'a> {
2
+ s: &'a u8
3
+}
4
+
5
+impl<'a> ArpIPv4<'a> {
6
+ const LENGTH: usize = 20;
7
8
+ pub fn to_buffer() -> [u8; Self::LENGTH] { //~ ERROR generic `Self` types are currently not permitted in anonymous constants
9
+ unimplemented!()
10
+ }
11
12
13
+pub fn main() {}
src/test/ui/associated-types/issue-47814.stderr
@@ -0,0 +1,14 @@
+error: generic `Self` types are currently not permitted in anonymous constants
+ --> $DIR/issue-47814.rs:8:32
+ |
+LL | pub fn to_buffer() -> [u8; Self::LENGTH] {
+ | ^^^^
+note: not a concrete type
+ --> $DIR/issue-47814.rs:5:10
+LL | impl<'a> ArpIPv4<'a> {
+ | ^^^^^^^^^^^
+error: aborting due to previous error
14
0 commit comments