Equal constant references seem to be combined into a single static object. Is this guaranteed?
const FOO: &[i32; 10] = &[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const BAR: &[i32; 10] = &[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
assert!(std::ptr::eq(FOO, BAR));
How about this?
const FOO: &[i32; 10] = &[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
assert!(std::ptr::eq(FOO, FOO));