These are chat archives for rust-lang/rust

May 2018
Vyacheslav Kim (Kane)
May 01 2018 01:42
    let v = vec![1_u8, 2, 3];
    let slice = &v[..];
    let sp = slice as *const [u8];
    let ep = sp as *const u8;
    println!("{:x}", unsafe{*ep.offset(1)})
why does this code work properly?
i.e. how can I go from *const [u8] -> *const u8 ?
Vyacheslav Kim (Kane)
May 01 2018 15:30
@superriva ok, I saw that [T] can be casted like this, just don't understand where it's implemented
Isaac Woods
May 01 2018 17:41
Anyone else doing Rust osdev getting an ICE with the new oom lang-item by any chance?
Dylan DPC
May 01 2018 19:08
is there a way in rust to subtract 2 "strings"? as in it tells the difference between them in form of non-similar chars or something on the similar lines?
Ed Page
May 01 2018 20:16
To make things even more confusing, there is also
James McCoy
May 01 2018 20:16
Yeah, there are a few but I picked ones that seemed more popular :)
Guess it depends on whether you want specific details (the difference crate) or just high-level information