This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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>>, | |
} |