]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-64908.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }