1- error[E0277]: the size for values of type `B ` cannot be known at compilation time
1+ error[E0277]: the size for values of type `A ` cannot be known at compilation time
22 --> $DIR/unsized-bound.rs:2:30
33 |
44LL | 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`
5+ | - ^^^^^^ doesn't have a size known at compile-time
6+ | |
7+ | this type parameter needs to be `Sized`
88 |
99 = note: required because it appears within the type `(A, B)`
1010note: required by an implicit `Sized` bound in `Trait`
@@ -15,35 +15,42 @@ LL | trait Trait<A> {}
1515help: consider removing the `?Sized` bound to make the type parameter `Sized`
1616 |
1717LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
18- LL + impl<A, B> Trait<(A, B)> for (A, B) where A : ?Sized, {}
18+ LL + impl<A, B> Trait<(A, B)> for (A, B) where B : ?Sized, {}
1919 |
2020help: consider relaxing the implicit `Sized` restriction
2121 |
2222LL | trait Trait<A: ?Sized> {}
2323 | ++++++++
2424
25- error[E0277]: the size for values of type `A ` cannot be known at compilation time
25+ error[E0277]: the size for values of type `B ` cannot be known at compilation time
2626 --> $DIR/unsized-bound.rs:2:30
2727 |
2828LL | 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`
29+ | - ^^^^^^ doesn't have a size known at compile-time
30+ | |
31+ | this type parameter needs to be `Sized`
3232 |
33- = note: only the last element of a tuple may have a dynamically sized type
33+ = note: required because it appears within the type `(A, B)`
34+ note: required by an implicit `Sized` bound in `Trait`
35+ --> $DIR/unsized-bound.rs:1:13
36+ |
37+ LL | trait Trait<A> {}
38+ | ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
3439help: consider removing the `?Sized` bound to make the type parameter `Sized`
3540 |
3641LL - 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, {}
42+ LL + impl<A, B> Trait<(A, B)> for (A, B) where A : ?Sized, {}
3843 |
44+ help: consider relaxing the implicit `Sized` restriction
45+ |
46+ LL | trait Trait<A: ?Sized> {}
47+ | ++++++++
3948
40- error[E0277]: the size for values of type `C ` cannot be known at compilation time
49+ error[E0277]: the size for values of type `A ` cannot be known at compilation time
4150 --> $DIR/unsized-bound.rs:5:52
4251 |
4352LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
44- | - ^^^^^^^^^ doesn't have a size known at compile-time
45- | |
46- | this type parameter needs to be `Sized`
53+ | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
4754 |
4855 = note: required because it appears within the type `(A, B, C)`
4956note: required by an implicit `Sized` bound in `Trait`
@@ -54,46 +61,66 @@ LL | trait Trait<A> {}
5461help: consider removing the `?Sized` bound to make the type parameter `Sized`
5562 |
5663LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
57- LL + impl<A, B: ?Sized, C> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
64+ LL + impl<A, B: ?Sized, C: ?Sized > Trait<(A, B, C)> for (A, B, C) {}
5865 |
5966help: consider relaxing the implicit `Sized` restriction
6067 |
6168LL | trait Trait<A: ?Sized> {}
6269 | ++++++++
6370
64- error[E0277]: the size for values of type `A ` cannot be known at compilation time
71+ error[E0277]: the size for values of type `B ` cannot be known at compilation time
6572 --> $DIR/unsized-bound.rs:5:52
6673 |
6774LL | 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
75+ | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
76+ |
77+ = note: required because it appears within the type `(A, B, C)`
78+ note: required by an implicit `Sized` bound in `Trait`
79+ --> $DIR/unsized-bound.rs:1:13
6980 |
70- = note: only the last element of a tuple may have a dynamically sized type
81+ LL | trait Trait<A> {}
82+ | ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
7183help: consider removing the `?Sized` bound to make the type parameter `Sized`
7284 |
7385LL - 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) {}
86+ LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
87+ |
88+ help: consider relaxing the implicit `Sized` restriction
7589 |
90+ LL | trait Trait<A: ?Sized> {}
91+ | ++++++++
7692
77- error[E0277]: the size for values of type `B ` cannot be known at compilation time
93+ error[E0277]: the size for values of type `C ` cannot be known at compilation time
7894 --> $DIR/unsized-bound.rs:5:52
7995 |
8096LL | 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
97+ | - ^^^^^^^^^ doesn't have a size known at compile-time
98+ | |
99+ | this type parameter needs to be `Sized`
100+ |
101+ = note: required because it appears within the type `(A, B, C)`
102+ note: required by an implicit `Sized` bound in `Trait`
103+ --> $DIR/unsized-bound.rs:1:13
82104 |
83- = note: only the last element of a tuple may have a dynamically sized type
105+ LL | trait Trait<A> {}
106+ | ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
84107help: consider removing the `?Sized` bound to make the type parameter `Sized`
85108 |
86109LL - 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, {}
110+ LL + impl<A, B: ?Sized, C > Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
88111 |
112+ help: consider relaxing the implicit `Sized` restriction
113+ |
114+ LL | trait Trait<A: ?Sized> {}
115+ | ++++++++
89116
90- error[E0277]: the size for values of type `B ` cannot be known at compilation time
117+ error[E0277]: the size for values of type `A ` cannot be known at compilation time
91118 --> $DIR/unsized-bound.rs:10:47
92119 |
93120LL | 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`
121+ | - ^^^^^^ doesn't have a size known at compile-time
122+ | |
123+ | this type parameter needs to be `Sized`
97124 |
98125 = note: required because it appears within the type `(A, B)`
99126note: required by an implicit `Sized` bound in `Trait2`
@@ -104,27 +131,36 @@ LL | trait Trait2<A> {}
104131help: consider removing the `?Sized` bound to make the type parameter `Sized`
105132 |
106133LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
107- LL + impl<A: ?Sized, B > Trait2<(A, B)> for (A, B) {}
134+ LL + impl<A, B : ?Sized> Trait2<(A, B)> for (A, B) {}
108135 |
109136help: consider relaxing the implicit `Sized` restriction
110137 |
111138LL | trait Trait2<A: ?Sized> {}
112139 | ++++++++
113140
114- error[E0277]: the size for values of type `A ` cannot be known at compilation time
141+ error[E0277]: the size for values of type `B ` cannot be known at compilation time
115142 --> $DIR/unsized-bound.rs:10:47
116143 |
117144LL | 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`
145+ | - ^^^^^^ doesn't have a size known at compile-time
146+ | |
147+ | this type parameter needs to be `Sized`
121148 |
122- = note: only the last element of a tuple may have a dynamically sized type
149+ = note: required because it appears within the type `(A, B)`
150+ note: required by an implicit `Sized` bound in `Trait2`
151+ --> $DIR/unsized-bound.rs:9:14
152+ |
153+ LL | trait Trait2<A> {}
154+ | ^ required by the implicit `Sized` requirement on this type parameter in `Trait2`
123155help: consider removing the `?Sized` bound to make the type parameter `Sized`
124156 |
125157LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
126- LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
158+ LL + impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
159+ |
160+ help: consider relaxing the implicit `Sized` restriction
127161 |
162+ LL | trait Trait2<A: ?Sized> {}
163+ | ++++++++
128164
129165error[E0277]: the size for values of type `A` cannot be known at compilation time
130166 --> $DIR/unsized-bound.rs:14:23
0 commit comments