2014-09-12 09:45:39 -05:00
|
|
|
// Check that when you implement a trait that has a sized type
|
|
|
|
// parameter, the corresponding value must be sized. Also that the
|
|
|
|
// self type must be sized if appropriate.
|
|
|
|
|
2014-12-19 05:54:09 -06:00
|
|
|
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
|
2014-09-12 09:45:39 -05:00
|
|
|
|
2015-01-06 17:34:10 -06:00
|
|
|
impl Foo<[isize]> for usize { }
|
2018-07-10 16:10:13 -05:00
|
|
|
//~^ ERROR the size for values of type
|
2014-09-12 09:45:39 -05:00
|
|
|
|
2014-12-05 20:12:25 -06:00
|
|
|
impl Foo<isize> for [usize] { }
|
2018-07-10 16:10:13 -05:00
|
|
|
//~^ ERROR the size for values of type
|
2014-09-12 09:45:39 -05:00
|
|
|
|
|
|
|
pub fn main() { }
|