| 
 | 1 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 2 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:12:12  | 
 | 3 | +   |  | 
 | 4 | +LL | fn foo2<T: ?Sized + ?Sized>(a: T) {}  | 
 | 5 | +   |            ^^^^^^   ^^^^^^  | 
 | 6 | + | 
 | 7 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 8 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:16:12  | 
 | 9 | +   |  | 
 | 10 | +LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}  | 
 | 11 | +   |            ^^^^^^   ^^^^^^  | 
 | 12 | + | 
 | 13 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 14 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:20:12  | 
 | 15 | +   |  | 
 | 16 | +LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}  | 
 | 17 | +   |            ^^^^^^           ^^^^^^  | 
 | 18 | + | 
 | 19 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 20 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:27:17  | 
 | 21 | +   |  | 
 | 22 | +LL | fn foo6(_: impl ?Sized + ?Sized) {}  | 
 | 23 | +   |                 ^^^^^^   ^^^^^^  | 
 | 24 | + | 
 | 25 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 26 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:31:17  | 
 | 27 | +   |  | 
 | 28 | +LL | fn foo7(_: impl ?Sized + ?Sized + Debug) {}  | 
 | 29 | +   |                 ^^^^^^   ^^^^^^  | 
 | 30 | + | 
 | 31 | +error[E0203]: type parameter has more than one relaxed default bound, only one is supported  | 
 | 32 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:35:17  | 
 | 33 | +   |  | 
 | 34 | +LL | fn foo8(_: impl ?Sized + Debug + ?Sized ) {}  | 
 | 35 | +   |                 ^^^^^^           ^^^^^^  | 
 | 36 | + | 
 | 37 | +error[E0277]: the size for values of type `T` cannot be known at compilation time  | 
 | 38 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:9:20  | 
 | 39 | +   |  | 
 | 40 | +LL | fn foo1<T: ?Sized>(a: T) {}  | 
 | 41 | +   |         -          ^ doesn't have a size known at compile-time  | 
 | 42 | +   |         |  | 
 | 43 | +   |         this type parameter needs to be `Sized`  | 
 | 44 | +   |  | 
 | 45 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 46 | +help: consider removing the `?Sized` bound to make the type parameter `Sized`  | 
 | 47 | +   |  | 
 | 48 | +LL - fn foo1<T: ?Sized>(a: T) {}  | 
 | 49 | +LL + fn foo1<T>(a: T) {}  | 
 | 50 | +   |  | 
 | 51 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 52 | +   |  | 
 | 53 | +LL | fn foo1<T: ?Sized>(a: &T) {}  | 
 | 54 | +   |                       +  | 
 | 55 | + | 
 | 56 | +error[E0277]: the size for values of type `T` cannot be known at compilation time  | 
 | 57 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:12:29  | 
 | 58 | +   |  | 
 | 59 | +LL | fn foo2<T: ?Sized + ?Sized>(a: T) {}  | 
 | 60 | +   |         -                   ^ doesn't have a size known at compile-time  | 
 | 61 | +   |         |  | 
 | 62 | +   |         this type parameter needs to be `Sized`  | 
 | 63 | +   |  | 
 | 64 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 65 | +help: consider removing the `?Sized` bound to make the type parameter `Sized`  | 
 | 66 | +   |  | 
 | 67 | +LL - fn foo2<T: ?Sized + ?Sized>(a: T) {}  | 
 | 68 | +LL + fn foo2<T>(a: T) {}  | 
 | 69 | +   |  | 
 | 70 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 71 | +   |  | 
 | 72 | +LL | fn foo2<T: ?Sized + ?Sized>(a: &T) {}  | 
 | 73 | +   |                                +  | 
 | 74 | + | 
 | 75 | +error[E0277]: the size for values of type `T` cannot be known at compilation time  | 
 | 76 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:16:37  | 
 | 77 | +   |  | 
 | 78 | +LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}  | 
 | 79 | +   |         -                           ^ doesn't have a size known at compile-time  | 
 | 80 | +   |         |  | 
 | 81 | +   |         this type parameter needs to be `Sized`  | 
 | 82 | +   |  | 
 | 83 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 84 | +help: consider restricting type parameters  | 
 | 85 | +   |  | 
 | 86 | +LL - fn foo3<T: ?Sized + ?Sized + Debug>(a: T) {}  | 
 | 87 | +LL + fn foo3<T: Debug>(a: T) {}  | 
 | 88 | +   |  | 
 | 89 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 90 | +   |  | 
 | 91 | +LL | fn foo3<T: ?Sized + ?Sized + Debug>(a: &T) {}  | 
 | 92 | +   |                                        +  | 
 | 93 | + | 
 | 94 | +error[E0277]: the size for values of type `T` cannot be known at compilation time  | 
 | 95 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:20:38  | 
 | 96 | +   |  | 
 | 97 | +LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}  | 
 | 98 | +   |         -                            ^ doesn't have a size known at compile-time  | 
 | 99 | +   |         |  | 
 | 100 | +   |         this type parameter needs to be `Sized`  | 
 | 101 | +   |  | 
 | 102 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 103 | +help: consider restricting type parameters  | 
 | 104 | +   |  | 
 | 105 | +LL - fn foo4<T: ?Sized + Debug + ?Sized >(a: T) {}  | 
 | 106 | +LL + fn foo4<T: Debug >(a: T) {}  | 
 | 107 | +   |  | 
 | 108 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 109 | +   |  | 
 | 110 | +LL | fn foo4<T: ?Sized + Debug + ?Sized >(a: &T) {}  | 
 | 111 | +   |                                         +  | 
 | 112 | + | 
 | 113 | +error[E0277]: the size for values of type `impl ?Sized` cannot be known at compilation time  | 
 | 114 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:24:9  | 
 | 115 | +   |  | 
 | 116 | +LL | fn foo5(_: impl ?Sized) {}  | 
 | 117 | +   |         ^  ----------- this type parameter needs to be `Sized`  | 
 | 118 | +   |         |  | 
 | 119 | +   |         doesn't have a size known at compile-time  | 
 | 120 | +   |  | 
 | 121 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 122 | +help: consider replacing `?Sized` with `Sized`  | 
 | 123 | +   |  | 
 | 124 | +LL - fn foo5(_: impl ?Sized) {}  | 
 | 125 | +LL + fn foo5(_: impl Sized) {}  | 
 | 126 | +   |  | 
 | 127 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 128 | +   |  | 
 | 129 | +LL | fn foo5(_: &impl ?Sized) {}  | 
 | 130 | +   |            +  | 
 | 131 | + | 
 | 132 | +error[E0277]: the size for values of type `impl ?Sized + ?Sized` cannot be known at compilation time  | 
 | 133 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:27:9  | 
 | 134 | +   |  | 
 | 135 | +LL | fn foo6(_: impl ?Sized + ?Sized) {}  | 
 | 136 | +   |         ^  -------------------- this type parameter needs to be `Sized`  | 
 | 137 | +   |         |  | 
 | 138 | +   |         doesn't have a size known at compile-time  | 
 | 139 | +   |  | 
 | 140 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 141 | +help: consider restricting type parameters  | 
 | 142 | +   |  | 
 | 143 | +LL - fn foo6(_: impl ?Sized + ?Sized) {}  | 
 | 144 | +LL + fn foo6(_: impl Sized) {}  | 
 | 145 | +   |  | 
 | 146 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 147 | +   |  | 
 | 148 | +LL | fn foo6(_: &impl ?Sized + ?Sized) {}  | 
 | 149 | +   |            +  | 
 | 150 | + | 
 | 151 | +error[E0277]: the size for values of type `impl ?Sized + ?Sized + Debug` cannot be known at compilation time  | 
 | 152 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:31:9  | 
 | 153 | +   |  | 
 | 154 | +LL | fn foo7(_: impl ?Sized + ?Sized + Debug) {}  | 
 | 155 | +   |         ^  ---------------------------- this type parameter needs to be `Sized`  | 
 | 156 | +   |         |  | 
 | 157 | +   |         doesn't have a size known at compile-time  | 
 | 158 | +   |  | 
 | 159 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 160 | +help: consider restricting type parameters  | 
 | 161 | +   |  | 
 | 162 | +LL - fn foo7(_: impl ?Sized + ?Sized + Debug) {}  | 
 | 163 | +LL + fn foo7(_: impl Debug) {}  | 
 | 164 | +   |  | 
 | 165 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 166 | +   |  | 
 | 167 | +LL | fn foo7(_: &impl ?Sized + ?Sized + Debug) {}  | 
 | 168 | +   |            +  | 
 | 169 | + | 
 | 170 | +error[E0277]: the size for values of type `impl ?Sized + Debug + ?Sized` cannot be known at compilation time  | 
 | 171 | +  --> $DIR/bad-suggestionf-for-repeated-unsized-bound-127441.rs:35:9  | 
 | 172 | +   |  | 
 | 173 | +LL | fn foo8(_: impl ?Sized + Debug + ?Sized ) {}  | 
 | 174 | +   |         ^  ---------------------------- this type parameter needs to be `Sized`  | 
 | 175 | +   |         |  | 
 | 176 | +   |         doesn't have a size known at compile-time  | 
 | 177 | +   |  | 
 | 178 | +   = help: unsized fn params are gated as an unstable feature  | 
 | 179 | +help: consider restricting type parameters  | 
 | 180 | +   |  | 
 | 181 | +LL - fn foo8(_: impl ?Sized + Debug + ?Sized ) {}  | 
 | 182 | +LL + fn foo8(_: impl Debug ) {}  | 
 | 183 | +   |  | 
 | 184 | +help: function arguments must have a statically known size, borrowed types always have a known size  | 
 | 185 | +   |  | 
 | 186 | +LL | fn foo8(_: &impl ?Sized + Debug + ?Sized ) {}  | 
 | 187 | +   |            +  | 
 | 188 | + | 
 | 189 | +error: aborting due to 14 previous errors  | 
 | 190 | + | 
 | 191 | +Some errors have detailed explanations: E0203, E0277.  | 
 | 192 | +For more information about an error, try `rustc --explain E0203`.  | 
0 commit comments