Skip to content

Commit c366129

Browse files
committed
Add regression test for #47814
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
1 parent 2341517 commit c366129

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: generic `Self` types are currently not permitted in anonymous constants
2+
--> $DIR/issue-47814.rs:8:32
3+
|
4+
LL | pub fn to_buffer() -> [u8; Self::LENGTH] {
5+
| ^^^^
6+
|
7+
note: not a concrete type
8+
--> $DIR/issue-47814.rs:5:10
9+
|
10+
LL | impl<'a> ArpIPv4<'a> {
11+
| ^^^^^^^^^^^
12+
13+
error: aborting due to previous error
14+

0 commit comments

Comments
 (0)