Skip to content

Instantly share code, notes, and snippets.

@nominolo
Created July 24, 2015 20:42
Show Gist options
  • Save nominolo/b2167817a159ff435818 to your computer and use it in GitHub Desktop.
Save nominolo/b2167817a159ff435818 to your computer and use it in GitHub Desktop.
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
/// 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