Last active
August 29, 2015 13:57
-
-
Save passcod/9754095 to your computer and use it in GitHub Desktop.
missing lifetime specifier error
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
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!"); | |
} |
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
$ 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