Given this struct holding a borrowed slice, which method body fails to compile and why?
struct Cursor<'a> {
buf: &'a [u8],
pos: usize,
}
impl<'a> Cursor<'a> {
fn rest(&self) -> &[u8] { &self.buf[self.pos..] }
fn take(self) -> &'a [u8] { &self.buf[self.pos..] }
}