Add regression test for #70155.
With #70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing #70155. A test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting #70155.
This commit is contained in:
parent
98803c182b
commit
bd1df44057
12
src/test/ui/const-generics/issues/issue-70155.rs
Normal file
12
src/test/ui/const-generics/issues/issue-70155.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// check-pass
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(const_generics)]
|
||||
|
||||
// Regression test for #70155:
|
||||
// `RangeInclusive` should be usable with const generics
|
||||
|
||||
struct S<const R: std::ops::RangeInclusive<usize>>;
|
||||
|
||||
const C : S<{ 0 ..= 999 }> = S;
|
||||
|
||||
pub fn main() {}
|
Loading…
Reference in New Issue
Block a user