Created
May 12, 2016 22:44
-
-
Save anonymous/876e8a31714dc3ba0b966d7391dd2c4e to your computer and use it in GitHub Desktop.
Shared via Rust Playground
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
#![allow(dead_code)] | |
#![allow(unused_variables)] | |
#![allow(unused_mut)] | |
struct Asdf(i32, Option<Gc<Asdf>>); | |
struct Gc<T>(*const T); | |
impl<T> Drop for Gc<T> { | |
fn drop(&mut self) { | |
// remove from roots | |
} | |
} | |
#[derive(Default)] | |
struct Heap<T> { | |
contents : Vec<T>, | |
roots : Vec<usize> | |
} | |
fn main() { | |
let mut heap : Heap<Asdf> = Heap{contents: vec!(), roots: vec!()}; | |
println!("Hello"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment