What is the lifetime of statically allocated const pointers? i.e
const Int = struct {int: u8};
fn lifetimesWhatIThought() *const Int {
//This is what I thought happened, but isn't what's happening.
const x_data = Int{.int = 1};
const x = &x_data;
return x;
}
fn lifetimes() *const Int {
const x: *const Int = &Int{.int = 1};
// Obviously the elements live here
return x;
}
pub main() void {
const x = lifetimes();
// The pointed to memory still live here, but where is the memory located?
}