about summary refs log tree commit diff
path: root/tests/ui/sized-hierarchy/pretty-print-opaque.stderr
blob: ecf4d912be8fbe559ade550b1b8b3bf680fc7c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
  --> $DIR/pretty-print-opaque.rs:35:26
   |
LL | pub fn pointeesized() -> Box<impl Tr + PointeeSized> {
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
note: required by a bound in `Box`
  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
  --> $DIR/pretty-print-opaque.rs:20:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `impl Tr + MetaSized`
   = note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`

error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
  --> $DIR/pretty-print-opaque.rs:29:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `impl Tr + MetaSized`
   = note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`

error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
  --> $DIR/pretty-print-opaque.rs:38:17
   |
LL |         let x = pointeesized();
   |                 ^^^^^^^^^^^^^^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
note: required by a bound in `Box`
  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known at compilation time
  --> $DIR/pretty-print-opaque.rs:40:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `impl Tr + PointeeSized`
   = note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`

error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
  --> $DIR/pretty-print-opaque.rs:40:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
   = note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0277`.