]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-64908.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[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 }