rust/tests/ui/consts/const-eval/issue-64908.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
362 B
Rust
Raw Normal View History

// 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::<()>();
}