1+ error[E0277]: the size for values of type `A` cannot be known at compilation time
2+ --> $DIR/unsized-bound.rs:2:30
3+ |
4+ LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
5+ | - ^^^^^^ doesn't have a size known at compile-time
6+ | |
7+ | this type parameter needs to be `Sized`
8+ |
9+ = note: only the last element of a tuple may have a dynamically sized type
10+ help: consider removing the `?Sized` bound to make the type parameter `Sized`
11+ |
12+ LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
13+ LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
14+ |
15+
116error[E0277]: the size for values of type `B` cannot be known at compilation time
217 --> $DIR/unsized-bound.rs:2:30
318 |
@@ -23,18 +38,29 @@ LL | trait Trait<A: ?Sized> {}
2338 | ++++++++
2439
2540error[E0277]: the size for values of type `A` cannot be known at compilation time
26- --> $DIR/unsized-bound.rs:2:30
41+ --> $DIR/unsized-bound.rs:5:52
2742 |
28- LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
29- | - ^^^^^^ doesn't have a size known at compile-time
30- | |
31- | this type parameter needs to be `Sized`
43+ LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
44+ | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
3245 |
3346 = note: only the last element of a tuple may have a dynamically sized type
3447help: consider removing the `?Sized` bound to make the type parameter `Sized`
3548 |
36- LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
37- LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
49+ LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
50+ LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) {}
51+ |
52+
53+ error[E0277]: the size for values of type `B` cannot be known at compilation time
54+ --> $DIR/unsized-bound.rs:5:52
55+ |
56+ LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
57+ | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
58+ |
59+ = note: only the last element of a tuple may have a dynamically sized type
60+ help: consider removing the `?Sized` bound to make the type parameter `Sized`
61+ |
62+ LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
63+ LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
3864 |
3965
4066error[E0277]: the size for values of type `C` cannot be known at compilation time
@@ -62,29 +88,18 @@ LL | trait Trait<A: ?Sized> {}
6288 | ++++++++
6389
6490error[E0277]: the size for values of type `A` cannot be known at compilation time
65- --> $DIR/unsized-bound.rs:5:52
66- |
67- LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
68- | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
69- |
70- = note: only the last element of a tuple may have a dynamically sized type
71- help: consider removing the `?Sized` bound to make the type parameter `Sized`
72- |
73- LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
74- LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) {}
75- |
76-
77- error[E0277]: the size for values of type `B` cannot be known at compilation time
78- --> $DIR/unsized-bound.rs:5:52
91+ --> $DIR/unsized-bound.rs:10:47
7992 |
80- LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
81- | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
93+ LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
94+ | - ^^^^^^ doesn't have a size known at compile-time
95+ | |
96+ | this type parameter needs to be `Sized`
8297 |
8398 = note: only the last element of a tuple may have a dynamically sized type
8499help: consider removing the `?Sized` bound to make the type parameter `Sized`
85100 |
86- LL - impl<A, B : ?Sized, C : ?Sized> Trait <(A, B, C )> for (A, B, C) where A: ?Sized, {}
87- LL + impl<A, B, C : ?Sized> Trait <(A, B, C )> for (A, B, C) where A: ?Sized, {}
101+ LL - impl<A: ?Sized, B : ?Sized> Trait2 <(A, B)> for (A, B) {}
102+ LL + impl<A, B: ?Sized> Trait2 <(A, B)> for (A, B) {}
88103 |
89104
90105error[E0277]: the size for values of type `B` cannot be known at compilation time
@@ -111,21 +126,6 @@ help: consider relaxing the implicit `Sized` restriction
111126LL | trait Trait2<A: ?Sized> {}
112127 | ++++++++
113128
114- error[E0277]: the size for values of type `A` cannot be known at compilation time
115- --> $DIR/unsized-bound.rs:10:47
116- |
117- LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
118- | - ^^^^^^ doesn't have a size known at compile-time
119- | |
120- | this type parameter needs to be `Sized`
121- |
122- = note: only the last element of a tuple may have a dynamically sized type
123- help: consider removing the `?Sized` bound to make the type parameter `Sized`
124- |
125- LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
126- LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
127- |
128-
129129error[E0277]: the size for values of type `A` cannot be known at compilation time
130130 --> $DIR/unsized-bound.rs:14:23
131131 |
0 commit comments