Skip to content

Commit e1fc22c

Browse files
committed
Add additional regression test
1 parent 5896998 commit e1fc22c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// check-pass
2+
// compile-flags: --emit=mir,link
3+
// Checks that we don't ICE due to attempting to run const prop
4+
// on a function with unsatisifable 'where' clauses
5+
6+
#![allow(unused)]
7+
8+
trait A {
9+
fn foo(&self) -> Self where Self: Copy;
10+
}
11+
12+
impl A for [fn(&())] {
13+
fn foo(&self) -> Self where Self: Copy { *(&[] as &[_]) }
14+
}
15+
16+
impl A for i32 {
17+
fn foo(&self) -> Self { 3 }
18+
}
19+
20+
fn main() {}

0 commit comments

Comments
 (0)