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
+
1
16
error[E0277]: the size for values of type `B` cannot be known at compilation time
2
17
--> $DIR/unsized-bound.rs:2:30
3
18
|
@@ -23,18 +38,29 @@ LL | trait Trait<A: ?Sized> {}
23
38
| ++++++++
24
39
25
40
error[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
27
42
|
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
32
45
|
33
46
= note: only the last element of a tuple may have a dynamically sized type
34
47
help: consider removing the `?Sized` bound to make the type parameter `Sized`
35
48
|
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, {}
38
64
|
39
65
40
66
error[E0277]: the size for values of type `C` cannot be known at compilation time
@@ -62,29 +88,18 @@ LL | trait Trait<A: ?Sized> {}
62
88
| ++++++++
63
89
64
90
error[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
79
92
|
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`
82
97
|
83
98
= note: only the last element of a tuple may have a dynamically sized type
84
99
help: consider removing the `?Sized` bound to make the type parameter `Sized`
85
100
|
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) {}
88
103
|
89
104
90
105
error[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
111
126
LL | trait Trait2<A: ?Sized> {}
112
127
| ++++++++
113
128
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
-
129
129
error[E0277]: the size for values of type `A` cannot be known at compilation time
130
130
--> $DIR/unsized-bound.rs:14:23
131
131
|
0 commit comments