]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-64908.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.git] / src / test / ui / consts / const-eval / issue-64908.rs
1 // run-pass
2
3 // This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic
4 // promoted MIR.
5
6 pub trait ArrowPrimitiveType {
7     type Native;
8 }
9
10 pub fn new<T: ArrowPrimitiveType>() {
11     assert_eq!(0, std::mem::size_of::<T::Native>());
12 }
13
14 impl ArrowPrimitiveType for () {
15     type Native = ();
16 }
17
18 fn main() {
19     new::<()>();
20 }