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