-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #105236 - JohnTitor:issue-47814, r=compiler-errors
Add regression test for #47814 Closes #47814 r? `@compiler-errors` Signed-off-by: Yuki Okushi <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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!() | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|