It would be good when we want to use method syntax and disable smart pointer optimizations.
fn foo(*const self) // this would not let smart pointer optimizations
It would be good when we want to use method syntax and disable smart pointer optimizations.
fn foo(*const self) // this would not let smart pointer optimizations
Because nobody has requested it, which probably means that nobody cared much for it.
Note that since the unsafe semantics of Rust have not been finalized, it may not be a good idea to bet that aliasing is fine, anyway.
I use to do this, for example in case of *const T
/// Consider that Self is a struct composed of f64 fields, like a vector
pub fn foo(&self) {
let self_ptr = self as *const Self as *const f64;
}