Skip to content

Commit 5f75e71

Browse files
committed
add test for ice 68875
Fixes #68875
1 parent 3fcf43b commit 5f75e71

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// check-fail
2+
3+
struct DataWrapper<'a> {
4+
data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants
5+
}
6+
7+
impl DataWrapper<'_> {
8+
const SIZE: usize = 14;
9+
}
10+
11+
pub fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: generic `Self` types are currently not permitted in anonymous constants
2+
--> $DIR/ice-68875.rs:4:20
3+
|
4+
LL | data: &'a [u8; Self::SIZE],
5+
| ^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)