]> git.proxmox.com Git - rustc.git/blame - src/test/ui/dst/dst-sized-trait-param.stderr
New upstream version 1.48.0~beta.8+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 |
1b1a35ee 10 = help: the trait `Sized` is not implemented for `[isize]`
f035d41b
XL
11help: consider relaxing the implicit `Sized` restriction
12 |
13LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
14 | ^^^^^^^^
b7449926
XL
15
16error[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
19LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
20 | ----- required by this bound in `Foo`
21...
b7449926
XL
22LL | 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
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0277`.