Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit b937ba4

Browse files
authored
Merge pull request #969 from matthiaskrgr/ices_4
add more ices
2 parents 0eb21e9 + aeee997 commit b937ba4

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

ices/88876.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![allow(incomplete_features)]
2+
#![feature(adt_const_params)]
3+
4+
struct FooConst<const ARRAY: &'static [&'static str]> {}
5+
6+
const FOO_ARR: &[&'static str; 2] = &["Hello", "Friend"];
7+
8+
fn main() {
9+
// Commenting the following line avoids the panic.
10+
let foo = FooConst::<FOO_ARR> {};
11+
}

ices/88997.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![allow(incomplete_features)]
2+
#![feature(generic_const_exprs)]
3+
4+
struct ConstAssert<const COND: bool>;
5+
trait True {}
6+
impl True for ConstAssert<true> {}
7+
8+
struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
9+
where
10+
ConstAssert<{ MIN <= MAX }>: True;

0 commit comments

Comments
 (0)