X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Funion%2Funion-sized-field.stderr;h=0f66f6c541b3fb609aedbcb8ac4e7f389110428b;hb=026d8ce7f5f66ba6fbb8aaf4babb533e95ee3efd;hp=ef86c624e9b19cb789da35959bee5f646a2a2f1c;hpb=7f32dd546f23f122a6c5e87db50e404261b75722;p=rust.git diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index ef86c624e9b..0f66f6c541b 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -10,16 +10,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | union Foo { - | -- +LL - union Foo { +LL + union Foo { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/union-sized-field.rs:9:12 @@ -33,16 +34,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | struct Foo2 { - | -- +LL - struct Foo2 { +LL + struct Foo2 { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/union-sized-field.rs:15:11 @@ -56,16 +58,17 @@ LL | Value(T), = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum Foo3 { - | -- +LL - enum Foo3 { +LL + enum Foo3 { + | help: borrowed types always have a statically known size | LL | Value(&T), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | Value(Box), - | ^^^^ ^ + | ++++ + error: aborting due to 3 previous errors