I have two &str pointing to the same string, and I need to know the byte offset between them:
&str
fn main() { let foo = \" bar\";
This is of course kind of unsafe, but if you want arithmetic, you can just cast the pointers to usize with as and subtract that.
usize
as
(Note: it's not so unsafe that the compiler will actually complain.)