about summary refs log tree commit diff
path: root/tests/ui/sized-hierarchy/default-supertrait.stderr
blob: f5589d6e279cc360a930a5b31f6e942c6d3970c2 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
error: relaxed bounds are not permitted in supertrait bounds
  --> $DIR/default-supertrait.rs:8:17
   |
LL | trait NegSized: ?Sized { }
   |                 ^^^^^^
   |
   = note: traits are `?Sized` by default

error: relaxed bounds are not permitted in supertrait bounds
  --> $DIR/default-supertrait.rs:13:21
   |
LL | trait NegMetaSized: ?MetaSized { }
   |                     ^^^^^^^^^^

error: relaxed bounds are not permitted in supertrait bounds
  --> $DIR/default-supertrait.rs:19:24
   |
LL | trait NegPointeeSized: ?PointeeSized { }
   |                        ^^^^^^^^^^^^^

error[E0277]: the size for values of type `T` cannot be known
  --> $DIR/default-supertrait.rs:52:38
   |
LL | fn with_bare_trait<T: PointeeSized + Bare>() {
   |                                      ^^^^ doesn't have a known size
   |
note: required by a bound in `Bare`
  --> $DIR/default-supertrait.rs:22:1
   |
LL | trait Bare {}
   | ^^^^^^^^^^^^^ required by this bound in `Bare`
help: consider further restricting type parameter `T` with unstable trait `MetaSized`
   |
LL | fn with_bare_trait<T: PointeeSized + Bare + std::marker::MetaSized>() {
   |                                           ++++++++++++++++++++++++

error[E0277]: the size for values of type `T` cannot be known at compilation time
  --> $DIR/default-supertrait.rs:35:22
   |
LL | fn with_metasized_supertrait<T: PointeeSized + MetaSized_>() {
   |                              - this type parameter needs to be `Sized`
LL |     requires_sized::<T>();
   |                      ^ doesn't have a size known at compile-time
   |
note: required by a bound in `requires_sized`
  --> $DIR/default-supertrait.rs:24:22
   |
LL | fn requires_sized<T: Sized>() {}
   |                      ^^^^^ required by this bound in `requires_sized`

error[E0277]: the size for values of type `T` cannot be known at compilation time
  --> $DIR/default-supertrait.rs:43:22
   |
LL | fn with_pointeesized_supertrait<T: PointeeSized + PointeeSized_>() {
   |                                 - this type parameter needs to be `Sized`
LL |     requires_sized::<T>();
   |                      ^ doesn't have a size known at compile-time
   |
note: required by a bound in `requires_sized`
  --> $DIR/default-supertrait.rs:24:22
   |
LL | fn requires_sized<T: Sized>() {}
   |                      ^^^^^ required by this bound in `requires_sized`

error[E0277]: the size for values of type `T` cannot be known
  --> $DIR/default-supertrait.rs:45:26
   |
LL |     requires_metasized::<T>();
   |                          ^ doesn't have a known size
   |
note: required by a bound in `requires_metasized`
  --> $DIR/default-supertrait.rs:25:26
   |
LL | fn requires_metasized<T: MetaSized>() {}
   |                          ^^^^^^^^^ required by this bound in `requires_metasized`
help: consider further restricting type parameter `T` with unstable trait `MetaSized`
   |
LL | fn with_pointeesized_supertrait<T: PointeeSized + PointeeSized_ + std::marker::MetaSized>() {
   |                                                                 ++++++++++++++++++++++++

error[E0277]: the size for values of type `T` cannot be known at compilation time
  --> $DIR/default-supertrait.rs:54:22
   |
LL | fn with_bare_trait<T: PointeeSized + Bare>() {
   |                    - this type parameter needs to be `Sized`
LL |
LL |     requires_sized::<T>();
   |                      ^ doesn't have a size known at compile-time
   |
note: required by a bound in `requires_sized`
  --> $DIR/default-supertrait.rs:24:22
   |
LL | fn requires_sized<T: Sized>() {}
   |                      ^^^^^ required by this bound in `requires_sized`

error[E0277]: the size for values of type `T` cannot be known
  --> $DIR/default-supertrait.rs:56:26
   |
LL |     requires_metasized::<T>();
   |                          ^ doesn't have a known size
   |
note: required by a bound in `requires_metasized`
  --> $DIR/default-supertrait.rs:25:26
   |
LL | fn requires_metasized<T: MetaSized>() {}
   |                          ^^^^^^^^^ required by this bound in `requires_metasized`
help: consider further restricting type parameter `T` with unstable trait `MetaSized`
   |
LL | fn with_bare_trait<T: PointeeSized + Bare + std::marker::MetaSized>() {
   |                                           ++++++++++++++++++++++++

error: aborting due to 9 previous errors

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