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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:12:12
|
LL | fn foo2<T: ?Sized + ?Sized>(a: T) {}
| ^^^^^^ ^^^^^^
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:16:12
|
LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}
| ^^^^^^ ^^^^^^
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:20:12
|
LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}
| ^^^^^^ ^^^^^^
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:27:17
|
LL | fn foo6(_: impl ?Sized + ?Sized) {}
| ^^^^^^ ^^^^^^
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:31:17
|
LL | fn foo7(_: impl ?Sized + ?Sized + Debug) {}
| ^^^^^^ ^^^^^^
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:35:17
|
LL | fn foo8(_: impl ?Sized + Debug + ?Sized ) {}
| ^^^^^^ ^^^^^^
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:9:23
|
LL | fn foo1<T: ?Sized>(a: T) {}
| - ^ doesn't have a size known at compile-time
| |
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn foo1<T: ?Sized>(a: T) {}
LL + fn foo1<T>(a: T) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo1<T: ?Sized>(a: &T) {}
| +
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:12:32
|
LL | fn foo2<T: ?Sized + ?Sized>(a: T) {}
| - ^ doesn't have a size known at compile-time
| |
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn foo2<T: ?Sized + ?Sized>(a: T) {}
LL + fn foo2<T>(a: T) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo2<T: ?Sized + ?Sized>(a: &T) {}
| +
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:16:40
|
LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}
| - ^ doesn't have a size known at compile-time
| |
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
LL - fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}
LL + fn foo3<T: Debug>(a: T) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: &T) {}
| +
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:20:41
|
LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}
| - ^ doesn't have a size known at compile-time
| |
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
LL - fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}
LL + fn foo4<T: Debug >(a: T) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: &T) {}
| +
error[E0277]: the size for values of type `impl ?Sized` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:24:12
|
LL | fn foo5(_: impl ?Sized) {}
| ^^^^^^^^^^^
| |
| doesn't have a size known at compile-time
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider replacing `?Sized` with `Sized`
|
LL - fn foo5(_: impl ?Sized) {}
LL + fn foo5(_: impl Sized) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo5(_: &impl ?Sized) {}
| +
error[E0277]: the size for values of type `impl ?Sized + ?Sized` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:27:12
|
LL | fn foo6(_: impl ?Sized + ?Sized) {}
| ^^^^^^^^^^^^^^^^^^^^
| |
| doesn't have a size known at compile-time
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
LL - fn foo6(_: impl ?Sized + ?Sized) {}
LL + fn foo6(_: impl Sized) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo6(_: &impl ?Sized + ?Sized) {}
| +
error[E0277]: the size for values of type `impl ?Sized + ?Sized + Debug` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:31:12
|
LL | fn foo7(_: impl ?Sized + ?Sized + Debug) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| doesn't have a size known at compile-time
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
LL - fn foo7(_: impl ?Sized + ?Sized + Debug) {}
LL + fn foo7(_: impl Debug) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo7(_: &impl ?Sized + ?Sized + Debug) {}
| +
error[E0277]: the size for values of type `impl ?Sized + Debug + ?Sized` cannot be known at compilation time
--> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:35:12
|
LL | fn foo8(_: impl ?Sized + Debug + ?Sized ) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| doesn't have a size known at compile-time
| this type parameter needs to be `Sized`
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
LL - fn foo8(_: impl ?Sized + Debug + ?Sized ) {}
LL + fn foo8(_: impl Debug ) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn foo8(_: &impl ?Sized + Debug + ?Sized ) {}
| +
error: aborting due to 14 previous errors
Some errors have detailed explanations: E0203, E0277.
For more information about an error, try `rustc --explain E0203`.
|