]> git.proxmox.com Git - rustc.git/blob - src/test/ui/dst/dst-sized-trait-param.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / dst / dst-sized-trait-param.stderr
1 error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
2 --> $DIR/dst-sized-trait-param.rs:7:6
3 |
4 LL | impl Foo<[isize]> for usize { }
5 | ^^^^^^^^^^^^ doesn't have a size known at compile-time
6 |
7 = help: the trait `Sized` is not implemented for `[isize]`
8 note: required by a bound in `Foo`
9 --> $DIR/dst-sized-trait-param.rs:5:11
10 |
11 LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
12 | ^ required by this bound in `Foo`
13 help: consider relaxing the implicit `Sized` restriction
14 |
15 LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
16 | ++++++++
17
18 error[E0277]: the size for values of type `[usize]` cannot be known at compilation time
19 --> $DIR/dst-sized-trait-param.rs:10:6
20 |
21 LL | impl Foo<isize> for [usize] { }
22 | ^^^^^^^^^^ doesn't have a size known at compile-time
23 |
24 = help: the trait `Sized` is not implemented for `[usize]`
25 note: required by a bound in `Foo`
26 --> $DIR/dst-sized-trait-param.rs:5:16
27 |
28 LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
29 | ^^^^^ required by this bound in `Foo`
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0277`.