Skip to content

Instantly share code, notes, and snippets.

@passcod

passcod/atreething.rs

Last active Aug 29, 2015
Embed
What would you like to do?
missing lifetime specifier error
mod treething {
use std::any::Any;
struct SizeTable(&[int]);
enum Content {
Data(&[&Any]),
Children(&[Node])
}
struct Node {
height: int,
content: Content,
sizetable: SizeTable
}
}
fn main() {
println("It runs!");
}
$ rustc atreething.rs | gist -p
atreething.rs:4:20: 4:26 error: missing lifetime specifier
atreething.rs:4 struct SizeTable(&[int]);
^~~~~~
atreething.rs:7:10: 7:17 error: missing lifetime specifier
atreething.rs:7 Data(&[&Any]),
^~~~~~~
atreething.rs:7:12: 7:16 error: missing lifetime specifier
atreething.rs:7 Data(&[&Any]),
^~~~
atreething.rs:8:14: 8:21 error: missing lifetime specifier
atreething.rs:8 Children(&[Node])
^~~~~~~
error: aborting due to 4 previous errors
task 'rustc' failed at 'explicit failure', /build/rust/src/rust-0.9/src/libsyntax/diagnostic.rs:75
task '<main>' failed at 'explicit failure', /build/rust/src/rust-0.9/src/librustc/lib.rs:453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment