Skip to content

Commit d772673

Browse files
committed
Add 83249
Issue: rust-lang/rust#83249
1 parent fdb04d3 commit d772673

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ices/83249.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#![allow(incomplete_features)]
2+
#![feature(const_generics, const_evaluatable_checked)]
3+
4+
trait Foo {
5+
const N: usize;
6+
}
7+
8+
impl Foo for u8 {
9+
const N: usize = 1;
10+
}
11+
12+
fn foo<T: Foo>(_: [u8; T::N]) -> T {
13+
todo!()
14+
}
15+
16+
pub fn bar() {
17+
// This equivalent line does not ICE
18+
//foo::<u8>([0; 1]);
19+
let _: u8 = foo([0; 1]);
20+
}
21+
22+
fn main() {}

0 commit comments

Comments
 (0)