mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
21 lines
363 B
Rust
21 lines
363 B
Rust
//@ 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::<()>();
|
|
}
|