]> git.proxmox.com Git - rustc.git/blob - src/test/ui/union/union-unsized.mirunsafeck.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / union / union-unsized.mirunsafeck.stderr
1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/union-unsized.rs:5:8
3 |
4 LL | a: str,
5 | ^^^ doesn't have a size known at compile-time
6 |
7 = help: the trait `Sized` is not implemented for `str`
8 = note: no field of a union may have a dynamically sized type
9 = help: change the field's type to have a statically known size
10 help: borrowed types always have a statically known size
11 |
12 LL | a: &str,
13 | +
14 help: the `Box` type always has a statically known size and allocates its contents in the heap
15 |
16 LL | a: Box<str>,
17 | ++++ +
18
19 error[E0277]: the size for values of type `str` cannot be known at compilation time
20 --> $DIR/union-unsized.rs:13:8
21 |
22 LL | b: str,
23 | ^^^ doesn't have a size known at compile-time
24 |
25 = help: the trait `Sized` is not implemented for `str`
26 = note: no field of a union may have a dynamically sized type
27 = help: change the field's type to have a statically known size
28 help: borrowed types always have a statically known size
29 |
30 LL | b: &str,
31 | +
32 help: the `Box` type always has a statically known size and allocates its contents in the heap
33 |
34 LL | b: Box<str>,
35 | ++++ +
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0277`.