2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2019-10-03 13:43:07 -04:00
|
|
|
|
|
|
|
// 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::<()>();
|
|
|
|
}
|