]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-rec-and-tup.rs
Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obk
[rust.git] / tests / ui / consts / const-rec-and-tup.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_upper_case_globals)]
4 #![allow(overflowing_literals)]
5
6 struct Pair { a: f64, b: f64 }
7
8 struct AnotherPair { x: (i64, i64), y: Pair }
9
10 static x : (i32,i32) = (0xfeedf00dd,0xca11ab1e);
11 static y : AnotherPair = AnotherPair{ x: (0xf0f0f0f0_f0f0f0f0,
12                                           0xabababab_abababab),
13                             y: Pair { a: 3.14159265358979323846,
14                                       b: 2.7182818284590452354 }};
15
16 pub fn main() {
17     let (p, _) = y.x;
18     assert_eq!(p, - 1085102592571150096);
19     println!("{:#x}", p);
20 }