]> git.lizzy.rs Git - rust.git/commitdiff
Rename stderr
authorNathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com>
Mon, 18 Oct 2021 10:52:37 +0000 (03:52 -0700)
committerNathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com>
Mon, 18 Oct 2021 10:52:37 +0000 (03:52 -0700)
tests/ui/trailing_zero_sized_array_without_repr.stderr [new file with mode: 0644]

diff --git a/tests/ui/trailing_zero_sized_array_without_repr.stderr b/tests/ui/trailing_zero_sized_array_without_repr.stderr
new file mode 100644 (file)
index 0000000..54b36ec
--- /dev/null
@@ -0,0 +1,110 @@
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:6:1
+   |
+LL | / struct RarelyUseful {
+LL | |     field: i32,
+LL | |     last: [usize; 0],
+LL | | }
+   | |_^
+   |
+   = note: `-D clippy::trailing-zero-sized-array-without-repr` implied by `-D warnings`
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:11:1
+   |
+LL | / struct OnlyField {
+LL | |     first_and_last: [usize; 0],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:15:1
+   |
+LL | / struct GenericArrayType<T> {
+LL | |     field: i32,
+LL | |     last: [T; 0],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:20:1
+   |
+LL | / #[must_use]
+LL | | struct OnlyAnotherAttributeMustUse {
+LL | |     field: i32,
+LL | |     last: [usize; 0],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:29:1
+   |
+LL | / struct OnlyAnotherAttributeDerive {
+LL | |     field: i32,
+LL | |     last: [usize; 0],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:35:1
+   |
+LL | / struct ZeroSizedWithConst {
+LL | |     field: i32,
+LL | |     last: [usize; ZERO],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:44:1
+   |
+LL | / struct ZeroSizedWithConstFunction {
+LL | |     field: i32,
+LL | |     last: [usize; compute_zero()],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:49:1
+   |
+LL | struct ZeroSizedArrayWrapper([usize; 0]);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:51:1
+   |
+LL | struct TupleStruct(i32, [usize; 0]);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
+  --> $DIR/trailing_zero_sized_array_without_repr.rs:53:1
+   |
+LL | / struct LotsOfFields {
+LL | |     f1: u32,
+LL | |     f2: u32,
+LL | |     f3: u32,
+...  |
+LL | |     last: [usize; 0],
+LL | | }
+   | |_^
+   |
+   = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
+
+error: aborting due to 10 previous errors
+