summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/issue-64908.rs
blob: d2e095072844ff1f6cd5a0baad255a07cac7c844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass

// This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic
// promoted MIR.

pub trait ArrowPrimitiveType {
    type Native;
}

pub fn new<T: ArrowPrimitiveType>() {
    assert_eq!(0, std::mem::size_of::<T::Native>());
}

impl ArrowPrimitiveType for () {
    type Native = ();
}

fn main() {
    new::<()>();
}