summary refs log tree commit diff
path: root/tests/ui/sized-hierarchy/default-bound.stderr
blob: 22f0fa29d3e23ff0620bcab17795c3bd20ae11d5 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
  --> $DIR/default-bound.rs:16:21
   |
LL | fn neg_metasized<T: ?MetaSized>() {}
   |                     ^^^^^^^^^^

error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
  --> $DIR/default-bound.rs:22:24
   |
LL | fn neg_pointeesized<T: ?PointeeSized>() { }
   |                        ^^^^^^^^^^^^^

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> $DIR/default-bound.rs:29:12
   |
LL |     bare::<[u8]>();
   |            ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
note: required by an implicit `Sized` bound in `bare`
  --> $DIR/default-bound.rs:6:9
   |
LL | fn bare<T>() {}
   |         ^ required by the implicit `Sized` requirement on this type parameter in `bare`
help: consider relaxing the implicit `Sized` restriction
   |
LL | fn bare<T: ?Sized>() {}
   |          ++++++++

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> $DIR/default-bound.rs:31:13
   |
LL |     sized::<[u8]>();
   |             ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `sized`
  --> $DIR/default-bound.rs:9:13
   |
LL | fn sized<T: Sized>() {}
   |             ^^^^^ required by this bound in `sized`

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
  --> $DIR/default-bound.rs:42:12
   |
LL |     bare::<Foo>();
   |            ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
note: required by an implicit `Sized` bound in `bare`
  --> $DIR/default-bound.rs:6:9
   |
LL | fn bare<T>() {}
   |         ^ required by the implicit `Sized` requirement on this type parameter in `bare`
help: consider relaxing the implicit `Sized` restriction
   |
LL | fn bare<T: ?Sized>() {}
   |          ++++++++

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
  --> $DIR/default-bound.rs:44:13
   |
LL |     sized::<Foo>();
   |             ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
note: required by a bound in `sized`
  --> $DIR/default-bound.rs:9:13
   |
LL | fn sized<T: Sized>() {}
   |             ^^^^^ required by this bound in `sized`

error[E0277]: the size for values of type `main::Foo` cannot be known
  --> $DIR/default-bound.rs:46:17
   |
LL |     metasized::<Foo>();
   |                 ^^^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `main::Foo`
note: required by a bound in `metasized`
  --> $DIR/default-bound.rs:14:17
   |
LL | fn metasized<T: MetaSized>() {}
   |                 ^^^^^^^^^ required by this bound in `metasized`

error: aborting due to 7 previous errors

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