]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-64908.rs
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[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 }