Guarantee slice representation
This RFC guarantees the representation of &str and &[T] to be equivalent to a repr(C) struct containing a pointer and a length.
@workingjubilee
Nonetheless, I have a question: what code specifically do we want to enable with this choice? Is it Rust code or external over-FFI code? In the latter case, refusing to stabilize any parameter-passing or return-passing details would remain somewhat frustrating and makes this less of an improvement over the status quo.
My use-case is FFI code (specifically, autogenerated C++ interop). Rust code can usually rely on calls to .as_ptr/len, so the guarantees in this RFC are much less useful in Rust. I don't particularly care whether the by-value ABI is stable as I'm happy to pass slice references by-pointer in parameter and return values.
Would be nice to also have this for Box<[T]> and Box<str>.