fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.9 KiB36 linesraw
1error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2  --> $DIR/unsized-exprs.rs:22:26
3   |
4LL |     udrop::<(i32, [u8])>((42, *foo()));
5   |                          ^^^^^^^^^^^^ doesn't have a size known at compile-time
6   |
7   = help: within `({integer}, [u8])`, the trait `std::marker::Sized` is not implemented for `[u8]`
8   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9   = note: required because it appears within the type `({integer}, [u8])`
10   = note: tuples must have a statically known size to be initialized
11
12error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
13  --> $DIR/unsized-exprs.rs:24:22
14   |
15LL |     udrop::<A<[u8]>>(A { 0: *foo() });
16   |                      ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
17   |
18   = help: within `A<[u8]>`, the trait `std::marker::Sized` is not implemented for `[u8]`
19   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
20   = note: required because it appears within the type `A<[u8]>`
21   = note: structs must have a statically known size to be initialized
22
23error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
24  --> $DIR/unsized-exprs.rs:26:22
25   |
26LL |     udrop::<A<[u8]>>(A(*foo()));
27   |                      ^ doesn't have a size known at compile-time
28   |
29   = help: within `A<[u8]>`, the trait `std::marker::Sized` is not implemented for `[u8]`
30   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
31   = note: required because it appears within the type `A<[u8]>`
32   = note: the return type of a function must have a statically known size
33
34error: aborting due to 3 previous errors
35
36For more information about this error, try `rustc --explain E0277`.