Rollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errors
add test for ice 68875 Fixes #68875
This commit is contained in:
commit
ad682ad391
11
src/test/ui/const-generics/ice-68875.rs
Normal file
11
src/test/ui/const-generics/ice-68875.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// check-fail
|
||||
|
||||
struct DataWrapper<'a> {
|
||||
data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants
|
||||
}
|
||||
|
||||
impl DataWrapper<'_> {
|
||||
const SIZE: usize = 14;
|
||||
}
|
||||
|
||||
pub fn main() {}
|
8
src/test/ui/const-generics/ice-68875.stderr
Normal file
8
src/test/ui/const-generics/ice-68875.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: generic `Self` types are currently not permitted in anonymous constants
|
||||
--> $DIR/ice-68875.rs:4:20
|
||||
|
|
||||
LL | data: &'a [u8; Self::SIZE],
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user