Skip to content

Commit c864468

Browse files
authored
Rollup merge of rust-lang#98683 - matthiaskrgr:ice-test-68875, r=compiler-errors
add test for ice 68875 Fixes rust-lang#68875
2 parents 125e0ae + 5f75e71 commit c864468

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Diff for: src/test/ui/const-generics/ice-68875.rs

+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() {}

Diff for: src/test/ui/const-generics/ice-68875.stderr

+8
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)