use std::rc::Rc;

#[derive(Show)]
struct Car {
    name : String,
}

#[derive(Show)]
struct Wheel<'a> {
    size : i32,
    owner : &'a Car,
}

fn main () {
    let car = Rc::new(Car {name: "DeLorean".to_string() });

    let mut v : Vec<Wheel> = Vec::new();

    for _ in range(0, 4) {
        let c = Wheel { size : 360, owner : &*car };
        v.push(c);
    }

    println!("{:?}", v);
}

struct Car {
    name : String,
}

struct Whhel {
    size : i32,
    owner : Car,
}

fn main () {
    let car = Car {name: "DeLorean".to_string() };

    for _ in range(0, 4) {
        Wheel { size : 360, owner : car };
    }
}

--- 
+++ 
@@ -1,25 +1,16 @@
-use std::rc::Rc;
-
-#[derive(Show)]
 struct Car {
     name : String,
 }
 
-#[derive(Show)]
-struct Wheel<'a> {
+struct Whhel {
     size : i32,
-    owner : &'a Car,
+    owner : Car,
 }
 
 fn main () {
-    let car = Rc::new(Car {name: "DeLorean".to_string() });
-
-    let mut v : Vec<Wheel> = Vec::new();
+    let car = Car {name: "DeLorean".to_string() };
 
     for _ in range(0, 4) {
-        let c = Wheel { size : 360, owner : &*car };
-        v.push(c);
+        Wheel { size : 360, owner : car };
     }
-
-    println!("{:?}", v);
 }
Fix car by ref example

&, Rc and Vec
