]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: the size for values of type `[isize]` cannot be known at compilation time |
0731742a | 2 | --> $DIR/dst-sized-trait-param.rs:7:6 |
b7449926 | 3 | | |
ba9703b0 XL |
4 | LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized |
5 | | - required by this bound in `Foo` | |
6 | LL | | |
b7449926 XL |
7 | LL | impl Foo<[isize]> for usize { } |
8 | | ^^^^^^^^^^^^ doesn't have a size known at compile-time | |
9 | | | |
1b1a35ee | 10 | = help: the trait `Sized` is not implemented for `[isize]` |
f035d41b XL |
11 | help: consider relaxing the implicit `Sized` restriction |
12 | | | |
13 | LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized | |
14 | | ^^^^^^^^ | |
b7449926 XL |
15 | |
16 | error[E0277]: the size for values of type `[usize]` cannot be known at compilation time | |
0731742a | 17 | --> $DIR/dst-sized-trait-param.rs:10:6 |
b7449926 | 18 | | |
ba9703b0 XL |
19 | LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized |
20 | | ----- required by this bound in `Foo` | |
21 | ... | |
b7449926 XL |
22 | LL | impl Foo<isize> for [usize] { } |
23 | | ^^^^^^^^^^ doesn't have a size known at compile-time | |
24 | | | |
1b1a35ee | 25 | = help: the trait `Sized` is not implemented for `[usize]` |
b7449926 XL |
26 | |
27 | error: aborting due to 2 previous errors | |
28 | ||
29 | For more information about this error, try `rustc --explain E0277`. |