add testcase for 87076
using https://github.com/rust-lang/rust/issues/87076#issuecomment-878090143 as testcase
This commit is contained in:
parent
10c0b003db
commit
7df032738c
1 changed files with 20 additions and 0 deletions
20
src/test/ui/const-generics/issues/issue-87076.rs
Normal file
20
src/test/ui/const-generics/issues/issue-87076.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// build-pass
|
||||
|
||||
#![feature(const_generics)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct UnitDims {
|
||||
pub time: u8,
|
||||
pub length: u8,
|
||||
}
|
||||
|
||||
pub struct UnitValue<const DIMS: UnitDims>;
|
||||
|
||||
impl<const DIMS: UnitDims> UnitValue<DIMS> {
|
||||
fn crash() {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
UnitValue::<{ UnitDims { time: 1, length: 2 } }>::crash();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue