Skip to content

Instantly share code, notes, and snippets.

@gchp
Created August 6, 2014 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gchp/45090c3e52bd07276a81 to your computer and use it in GitHub Desktop.
Save gchp/45090c3e52bd07276a81 to your computer and use it in GitHub Desktop.
struct Line {
next: Option<&Line>, // error: missing lifetime specifier [E0106]
prev: Option<&Line>, // error: missing lifetime specifier [E0106]
data: Option<String>,
}
fn main() {
let l = Line { next: None, prev: None, data: "test".to_string() };
println!("{}", l.data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment