Created
July 24, 2015 20:42
-
-
Save nominolo/b2167817a159ff435818 to your computer and use it in GitHub Desktop.
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
src/irbuffer.rs:12:5: 12:19 error: the trait `core::marker::Sized` is not implemented for the type `[irbuffer::Node]` [E0277] | |
src/irbuffer.rs:12 buffer: [Node], | |
^~~~~~~~~~~~~~ | |
src/irbuffer.rs:12:5: 12:19 note: `[irbuffer::Node]` does not have a constant size known at compile-time | |
src/irbuffer.rs:12 buffer: [Node], | |
^~~~~~~~~~~~~~ | |
error: aborting due to previous 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
/// A reference to a node in an `GraphBuffer`. | |
struct Ref(pub u16); | |
/// A node in the program graph. | |
enum Node { | |
Const64(u64), | |
Ret1(Ref) | |
} | |
struct GraphBuffer { | |
buffer: [Node], | |
next_ref: u16 | |
} | |
impl GraphBuffer { | |
fn const64(&mut self, value: u64) -> Ref { | |
Ref(0) // placeholder | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment