]> git.proxmox.com Git - rustc.git/blame - src/test/ui/dst/dst-sized-trait-param.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / dst / dst-sized-trait-param.stderr
CommitLineData
b7449926 1error[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
4LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
5 | - required by this bound in `Foo`
6LL |
b7449926
XL
7LL | 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
13error[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
16LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
17 | ----- required by this bound in `Foo`
18...
b7449926
XL
19LL | 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
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0277`.