We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2341517 commit c366129Copy full SHA for c366129
src/test/ui/associated-consts/issue-47814.rs
@@ -0,0 +1,14 @@
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] {
9
+ //~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
10
+ unimplemented!()
11
+ }
12
13
14
+fn main() {}
src/test/ui/associated-consts/issue-47814.stderr
+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
0 commit comments