]> git.proxmox.com Git - rustc.git/blame - tests/ui/consts/const-eval/issue-64908.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / const-eval / issue-64908.rs
CommitLineData
e74abb32
XL
1// run-pass
2
3// This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic
4// promoted MIR.
5
6pub trait ArrowPrimitiveType {
7 type Native;
8}
9
10pub fn new<T: ArrowPrimitiveType>() {
11 assert_eq!(0, std::mem::size_of::<T::Native>());
12}
13
14impl ArrowPrimitiveType for () {
15 type Native = ();
16}
17
18fn main() {
19 new::<()>();
20}