title: How to implement Debug to struct with `RefCell<Vec<Weak<Gadget>>>` field type?
body: <p>code:</p>
  
  <pre><code>struct Owner {
      name: String,
      gadgets: RefCell&lt;Vec&lt;Weak&lt;Gadget&gt;&gt;&gt;,
  }
  
  //code omitted
  
  impl fmt::Debug for Owner {
      fn fmt(&amp;self, f: &amp;mut fmt::Formatter) -&gt; fmt::Result {
          write!(f, "Owner {{ name: {}, gadgets: {:?} }}", self.name, self.gadgets.into_inner())
      }
  }
  
  fn main() {
      let gadget_owner : Rc&lt;Owner&gt; = Rc::new( Owner { /**/ });
      let gadget1 = gadget_owner.make_gadget(1);
      println!("gadget1 is: {:?}", gadget1);
  }
  </code></pre>
  
  <p>bring error:</p>
  
  <pre><code>error: cannot move out of borrowed content [E0507]
  src/main.rs:25         write!(f, "Owner {{ name: {}, gadgets: {:?} }}", self.name, self.gadgets.into_inner())
                                                                                     ^~~~
  </code></pre>
  
  <p><a href="http://pastebin.com/jUYayJ3P" rel="nofollow">full code there</a></p>