Skip to content

Commit

Permalink
Rollup merge of #87266 - hellow554:issue87076, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Add testcase for 87076

Closes #87076

I also moved the issue tests into the issues subfolder, nothing changed there.
  • Loading branch information
JohnTitor authored Jul 23, 2021
2 parents 1a2b90b + 05217d5 commit 8b89c32
Show file tree
Hide file tree
Showing 32 changed files with 20 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions src/test/ui/const-generics/issues/issue-87076.rs
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 8b89c32

Please sign in to comment.