Skip to content

Instantly share code, notes, and snippets.

View slauwers's full-sized avatar

Sebastian Lauwers slauwers

  • Interact-IV
  • Perpignan, France
View GitHub Profile
// Goal of this file:
// Figure out how the lifetimes of a mutable reference is exactly defined
// and what happens if a `&mut` reference A is assigned to another `&mut`
// reference B - is the lifetime of B inheriated from A or does the lifetime
// of B depends on the location of the definition of B?
struct Entry<'a> {
id: isize,
next: Option<&'a mut Entry<'a>>,
}