about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-23 20:43:38 +0000
committerbors <bors@rust-lang.org>2024-01-23 20:43:38 +0000
commit5d3d3479d774754856db2db3e439dfb88ef3c52f (patch)
treec1fb20b5e72855a5a638b349d6c69ba76ae1a0fd /tests/ui/array-slice-vec
parentdfe53afaebd817f334d8ef9dc75a5cd2562cf6e6 (diff)
parent08bac31f8f95a9cf2bdcbecfb65ca8de5b644699 (diff)
downloadrust-5d3d3479d774754856db2db3e439dfb88ef3c52f.tar.gz
rust-5d3d3479d774754856db2db3e439dfb88ef3c52f.zip
Auto merge of #120281 - fmease:rollup-9nxail8, r=fmease
Rollup of 10 pull requests

Successful merges:

 - #119028 (Add more weirdness to weird-exprs.rs)
 - #119805 (Suggest array::from_fn for array initialization)
 - #120188 (compiler: update freebsd and netbsd base specs.)
 - #120215 (Update some deps with `bitflags` v1 dependencies)
 - #120244 (Use `Self` in `NonZero*` implementations.)
 - #120246 (Re-add estebank to review rotation)
 - #120252 (rename `RawTy` to `LoweredTy`)
 - #120255 (correct my mailmap entry)
 - #120270 (A bunch of random modifications)
 - #120280 (Move condition enabling the pass to `is_enabled`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/array-slice-vec')
-rw-r--r--tests/ui/array-slice-vec/repeat_empty_ok.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/repeat_empty_ok.stderr b/tests/ui/array-slice-vec/repeat_empty_ok.stderr
index e8bac04ac45..bc3a68c905d 100644
--- a/tests/ui/array-slice-vec/repeat_empty_ok.stderr
+++ b/tests/ui/array-slice-vec/repeat_empty_ok.stderr
@@ -5,6 +5,8 @@ LL |     let headers = [Header{value: &[]}; 128];
    |                    ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>`
    |
    = note: the `Copy` trait is required because this value will be copied for each element of the array
+   = help: consider using `core::array::from_fn` to initialize the array
+   = help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
 help: consider annotating `Header<'_>` with `#[derive(Copy)]`
    |
 LL + #[derive(Copy)]
@@ -18,6 +20,8 @@ LL |     let headers = [Header{value: &[0]}; 128];
    |                    ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>`
    |
    = note: the `Copy` trait is required because this value will be copied for each element of the array
+   = help: consider using `core::array::from_fn` to initialize the array
+   = help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
 help: consider annotating `Header<'_>` with `#[derive(Copy)]`
    |
 LL + #[derive(Copy)]