fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: the size for values of type `X` cannot be known at compilation time 2 --> $DIR/unsized3.rs:7:10 3 | 4LL | fn f1<X: ?Sized>(x: &X) { 5 | - this type parameter needs to be `Sized` 6LL | f2::<X>(x); 7 | ^ doesn't have a size known at compile-time 8 | 9note: required by a bound in `f2` 10 --> $DIR/unsized3.rs:10:7 11 | 12LL | fn f2<X>(x: &X) { 13 | ^ required by this bound in `f2` 14help: consider removing the `?Sized` bound to make the type parameter `Sized` 15 | 16LL - fn f1<X: ?Sized>(x: &X) { 17LL + fn f1<X>(x: &X) { 18 | 19help: consider relaxing the implicit `Sized` restriction 20 | 21LL | fn f2<X: ?Sized>(x: &X) { 22 | ++++++++ 23 24error[E0277]: the size for values of type `X` cannot be known at compilation time 25 --> $DIR/unsized3.rs:18:10 26 | 27LL | fn f3<X: ?Sized + T>(x: &X) { 28 | - this type parameter needs to be `Sized` 29LL | f4::<X>(x); 30 | ^ doesn't have a size known at compile-time 31 | 32note: required by a bound in `f4` 33 --> $DIR/unsized3.rs:21:7 34 | 35LL | fn f4<X: T>(x: &X) { 36 | ^ required by this bound in `f4` 37help: consider removing the `?Sized` bound to make the type parameter `Sized` 38 | 39LL - fn f3<X: ?Sized + T>(x: &X) { 40LL + fn f3<X: T>(x: &X) { 41 | 42help: consider relaxing the implicit `Sized` restriction 43 | 44LL | fn f4<X: T + ?Sized>(x: &X) { 45 | ++++++++ 46 47error[E0277]: the size for values of type `X` cannot be known at compilation time 48 --> $DIR/unsized3.rs:33:8 49 | 50LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) { 51 | - this type parameter needs to be `Sized` 52LL | f5(x1); 53 | -- ^^ doesn't have a size known at compile-time 54 | | 55 | required by a bound introduced by this call 56 | 57note: required because it appears within the type `S<X>` 58 --> $DIR/unsized3.rs:28:8 59 | 60LL | struct S<X: ?Sized> { 61 | ^ 62note: required by a bound in `f5` 63 --> $DIR/unsized3.rs:24:7 64 | 65LL | fn f5<Y>(x: &Y) {} 66 | ^ required by this bound in `f5` 67help: consider removing the `?Sized` bound to make the type parameter `Sized` 68 | 69LL - fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) { 70LL + fn f8<X>(x1: &S<X>, x2: &S<X>) { 71 | 72help: consider relaxing the implicit `Sized` restriction 73 | 74LL | fn f5<Y: ?Sized>(x: &Y) {} 75 | ++++++++ 76 77error[E0277]: the size for values of type `X` cannot be known at compilation time 78 --> $DIR/unsized3.rs:40:5 79 | 80LL | fn f9<X: ?Sized>(x1: Box<S<X>>) { 81 | - this type parameter needs to be `Sized` 82LL | f5(&(*x1, 34)); 83 | ^^ doesn't have a size known at compile-time 84 | 85note: required because it appears within the type `S<X>` 86 --> $DIR/unsized3.rs:28:8 87 | 88LL | struct S<X: ?Sized> { 89 | ^ 90 = note: only the last element of a tuple may have a dynamically sized type 91help: consider removing the `?Sized` bound to make the type parameter `Sized` 92 | 93LL - fn f9<X: ?Sized>(x1: Box<S<X>>) { 94LL + fn f9<X>(x1: Box<S<X>>) { 95 | 96 97error[E0277]: the size for values of type `X` cannot be known at compilation time 98 --> $DIR/unsized3.rs:45:9 99 | 100LL | fn f10<X: ?Sized>(x1: Box<S<X>>) { 101 | - this type parameter needs to be `Sized` 102LL | f5(&(32, *x1)); 103 | ^^^^^^^^^ doesn't have a size known at compile-time 104 | 105note: required because it appears within the type `S<X>` 106 --> $DIR/unsized3.rs:28:8 107 | 108LL | struct S<X: ?Sized> { 109 | ^ 110 = note: required because it appears within the type `({integer}, S<X>)` 111 = note: tuples must have a statically known size to be initialized 112help: consider removing the `?Sized` bound to make the type parameter `Sized` 113 | 114LL - fn f10<X: ?Sized>(x1: Box<S<X>>) { 115LL + fn f10<X>(x1: Box<S<X>>) { 116 | 117 118error[E0277]: the size for values of type `X` cannot be known at compilation time 119 --> $DIR/unsized3.rs:45:8 120 | 121LL | fn f10<X: ?Sized>(x1: Box<S<X>>) { 122 | - this type parameter needs to be `Sized` 123LL | f5(&(32, *x1)); 124 | -- ^^^^^^^^^^ doesn't have a size known at compile-time 125 | | 126 | required by a bound introduced by this call 127 | 128note: required because it appears within the type `S<X>` 129 --> $DIR/unsized3.rs:28:8 130 | 131LL | struct S<X: ?Sized> { 132 | ^ 133 = note: required because it appears within the type `({integer}, S<X>)` 134note: required by a bound in `f5` 135 --> $DIR/unsized3.rs:24:7 136 | 137LL | fn f5<Y>(x: &Y) {} 138 | ^ required by this bound in `f5` 139help: consider removing the `?Sized` bound to make the type parameter `Sized` 140 | 141LL - fn f10<X: ?Sized>(x1: Box<S<X>>) { 142LL + fn f10<X>(x1: Box<S<X>>) { 143 | 144help: consider relaxing the implicit `Sized` restriction 145 | 146LL | fn f5<Y: ?Sized>(x: &Y) {} 147 | ++++++++ 148 149error: aborting due to 6 previous errors 150 151For more information about this error, try `rustc --explain E0277`.