title: How to have a reference to a trait and still use original struct?
body: <p>My goal is to have a reference counted struct which is referred as a trait in one context and by its concrete type in another. Best explained in code:</p>
  
  <pre><code>#![feature(box_syntax)]
  
  use std::rc::Rc;
  use std::cell::RefCell;
  
  trait Employee {
      fn be_managed(&amp;mut self);
  }
  
  struct Human;
  
  impl Human {
      fn be_human(&amp;mut self) {
          println!("I'm just a human who needs a mutable self sometimes");
      }
  }
  
  impl Employee for Human {
      fn be_managed(&amp;mut self) {
          println!("Off to the salt mines");
      }
  }
  
  struct Manager {
      my_employee: Rc&lt;RefCell&lt;Box&lt;Employee + 'static&gt;&gt;&gt;, //'
  }
  
  fn main() {
      let mut human1 = Rc::new(RefCell::new(box Human as Box&lt;Employee&gt;));
  
      let manager1 = Manager {
          my_employee: human1.clone(), // This works due to cast above
      };
  
      manager1.my_employee.borrow_mut().be_managed();
  
      human1.borrow_mut().be_human(); // But we can't be human anymore
  
  
  
      let mut human2 = Rc::new(RefCell::new(box Human));
  
      let manager2 = Manager {
          my_employee: human2.clone(), // This doesn't work
      };
  
      manager2.my_employee.borrow_mut().be_managed();
  
      human2.borrow_mut().be_human();
  }
  </code></pre>
  
  <p>I want the <code>Manager</code> to be able to have any struct implementing the <code>Employee</code> trait as <code>my_employee</code>, but other references should still be able to call other methods on the original object, ie <code>be_human</code>.</p>
  
  <p>Right now I'm getting the following errors from the above code:</p>
  
  <pre><code>src/main.rs:37:25: 37:35 error: type `core::cell::RefMut&lt;'_, Box&lt;Employee&gt;&gt;` does not implement any method in scope named `be_human`
  src/main.rs:37     human1.borrow_mut().be_human(); // But we can't be human anymore
                                         ^~~~~~~~~~
  src/main.rs:44:22: 44:36 error: mismatched types:
   expected `alloc::rc::Rc&lt;core::cell::RefCell&lt;Box&lt;Employee + 'static&gt;&gt;&gt;`,
      found `alloc::rc::Rc&lt;core::cell::RefCell&lt;Box&lt;Human&gt;&gt;&gt;`
  (expected trait Employee,
      found struct `Human`) [E0308]
  src/main.rs:44         my_employee: human2.clone(), // This doesn't work
                                      ^~~~~~~~~~~~~~
  </code></pre>
  
  <p>What's the right approach in this situation?</p>