]>
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 | | | |
10 | = help: the trait `std::marker::Sized` is not implemented for `[isize]` | |
0731742a | 11 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
b7449926 XL |
12 | |
13 | error[E0277]: the size for values of type `[usize]` cannot be known at compilation time | |
0731742a | 14 | --> $DIR/dst-sized-trait-param.rs:10:6 |
b7449926 | 15 | | |
ba9703b0 XL |
16 | LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized |
17 | | ----- required by this bound in `Foo` | |
18 | ... | |
b7449926 XL |
19 | LL | impl Foo<isize> for [usize] { } |
20 | | ^^^^^^^^^^ doesn't have a size known at compile-time | |
21 | | | |
22 | = help: the trait `std::marker::Sized` is not implemented for `[usize]` | |
0731742a | 23 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
b7449926 XL |
24 | |
25 | error: aborting due to 2 previous errors | |
26 | ||
27 | For more information about this error, try `rustc --explain E0277`. |