提交 c9f28654 编写于 作者: M Matthias Krüger

add test for 47814

not sure if the issue should actually get closed though, hm

r? @compiler-errors
上级 3fcf43bb
struct ArpIPv4<'a> {
s: &'a u8
}
impl<'a> ArpIPv4<'a> {
const LENGTH: usize = 20;
pub fn to_buffer() -> [u8; Self::LENGTH] { //~ ERROR generic `Self` types are currently not permitted in anonymous constants
unimplemented!()
}
}
pub fn main() {}
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册