]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-67696-const-prop-ice.rs
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / consts / issue-67696-const-prop-ice.rs
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() {}