title: What is 'core::kinds::Sized` is not implemented for the type `Self' in rust?
body: <p>This used to work:</p>
  
  <pre><code>struct Foo&lt;'a, T&gt; {
    parent:&amp;'a (Array&lt;T&gt; + 'a)
  }
  
  impl&lt;'a, T&gt; Foo&lt;'a, T&gt; { //'
    pub fn new&lt;T&gt;(parent:&amp;Array&lt;T&gt;) -&gt; Foo&lt;T&gt; {
      return Foo {
        parent: parent
      };
    }
  }
  
  trait Array&lt;T&gt; {
    fn as_foo(&amp;self) -&gt; Foo&lt;T&gt; {
      return Foo::new(self);
    }
  }
  
  fn main() {
  }
  </code></pre>
  
  <p>Now it errors:</p>
  
  <blockquote>
    <p>:15:21: 15:25 error: the trait <code>core::kinds::Sized</code> is not implemented for the type <code>Self</code>
    :15     return Foo::new(self);</p>
  </blockquote>
  
  <p>I can kind of guess what's wrong; it's saying that my impl of Foo&lt;'a, T> is for T, not Sized? T, but I'm not trying to store a Sized? element in it; I'm storing a <em>reference</em> to a Sized element in it. That should be a pointer, fixed size.</p>
  
  <p>I don't see what's wrong with what I'm doing, or why it's wrong?</p>
  
  <p>For example, I should (I think...) be able to store a &amp;Array in my Foo, no problem. I can't see any reason this would force my Foo instance to be unsized.</p>
  
  <p>playpen link: <a href="http://is.gd/eZSZYv" rel="noreferrer">http://is.gd/eZSZYv</a></p>