fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0277]: the size for values of type `X` cannot be known at compilation time 2 --> $DIR/unsized3.rs:7:13 3 | 4LL | fn f1<X: ?Sized>(x: &X) { 5 | - this type parameter needs to be `std::marker::Sized` 6LL | f2::<X>(x); 7 | ^ doesn't have a size known at compile-time 8... 9LL | fn f2<X>(x: &X) { 10 | -- -- help: consider relaxing the implicit `Sized` restriction: `: ?Sized` 11 | | 12 | required by this bound in `f2` 13 | 14 = help: the trait `std::marker::Sized` is not implemented for `X` 15 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 16 17error[E0277]: the size for values of type `X` cannot be known at compilation time 18 --> $DIR/unsized3.rs:18:13 19 | 20LL | fn f3<X: ?Sized + T>(x: &X) { 21 | - this type parameter needs to be `std::marker::Sized` 22LL | f4::<X>(x); 23 | ^ doesn't have a size known at compile-time 24... 25LL | fn f4<X: T>(x: &X) { 26 | -- - - help: consider relaxing the implicit `Sized` restriction: `+ ?Sized` 27 | | 28 | required by this bound in `f4` 29 | 30 = help: the trait `std::marker::Sized` is not implemented for `X` 31 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 32 33error[E0277]: the size for values of type `X` cannot be known at compilation time 34 --> $DIR/unsized3.rs:33:8 35 | 36LL | fn f5<Y>(x: &Y) {} 37 | -- - required by this bound in `f5` 38... 39LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) { 40 | - this type parameter needs to be `std::marker::Sized` 41LL | f5(x1); 42 | ^^ doesn't have a size known at compile-time 43 | 44 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X` 45 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 46 = note: required because it appears within the type `S<X>` 47 48error[E0277]: the size for values of type `X` cannot be known at compilation time 49 --> $DIR/unsized3.rs:40:8 50 | 51LL | fn f9<X: ?Sized>(x1: Box<S<X>>) { 52 | - this type parameter needs to be `std::marker::Sized` 53LL | f5(&(*x1, 34)); 54 | ^^^^^^^^^^ doesn't have a size known at compile-time 55 | 56 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X` 57 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 58 = note: required because it appears within the type `S<X>` 59 = note: only the last element of a tuple may have a dynamically sized type 60 61error[E0277]: the size for values of type `X` cannot be known at compilation time 62 --> $DIR/unsized3.rs:45:9 63 | 64LL | fn f10<X: ?Sized>(x1: Box<S<X>>) { 65 | - this type parameter needs to be `std::marker::Sized` 66LL | f5(&(32, *x1)); 67 | ^^^^^^^^^ doesn't have a size known at compile-time 68 | 69 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X` 70 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 71 = note: required because it appears within the type `S<X>` 72 = note: required because it appears within the type `({integer}, S<X>)` 73 = note: tuples must have a statically known size to be initialized 74 75error[E0277]: the size for values of type `X` cannot be known at compilation time 76 --> $DIR/unsized3.rs:45:8 77 | 78LL | fn f5<Y>(x: &Y) {} 79 | -- - required by this bound in `f5` 80... 81LL | fn f10<X: ?Sized>(x1: Box<S<X>>) { 82 | - this type parameter needs to be `std::marker::Sized` 83LL | f5(&(32, *x1)); 84 | ^^^^^^^^^^ doesn't have a size known at compile-time 85 | 86 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X` 87 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 88 = note: required because it appears within the type `S<X>` 89 = note: required because it appears within the type `({integer}, S<X>)` 90 91error: aborting due to 6 previous errors 92 93For more information about this error, try `rustc --explain E0277`.