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

Commit 63b18c0

Browse files
Add 85031 (#743)
Co-authored-by: Yuki Okushi <[email protected]>
1 parent 9189af0 commit 63b18c0

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

ices/85031-1.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF'
4+
#![allow(incomplete_features)]
5+
#![feature(const_generics, const_evaluatable_checked)]
6+
7+
pub struct Ref<'a>(&'a i32);
8+
9+
impl<'a> Ref<'a> {
10+
pub fn foo<const A: usize>() -> [(); A - 0] {
11+
Self::foo()
12+
}
13+
}
14+
15+
EOF
16+

ices/85031-2.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF'
4+
#![allow(incomplete_features)]
5+
#![feature(const_generics, const_evaluatable_checked)]
6+
7+
pub struct Ref<'a>(&'a i32);
8+
9+
impl Ref<'_> {
10+
pub fn foo<const A: usize>()
11+
where
12+
([(); A - 0], ()): Sized,
13+
{
14+
Self::bar::<A>()
15+
}
16+
17+
fn bar<const A: usize>()
18+
where
19+
([(); A - 0], ()): Sized,
20+
{
21+
}
22+
}
23+
24+
EOF

0 commit comments

Comments
 (0)