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-24 08:12:24 +0000
committerbors <bors@rust-lang.org>2024-01-24 08:12:24 +0000
commitcf22ee0c0c86c0c60a3cee8a66bd361861e681b1 (patch)
treec50ccb0ecdbaa6422d4161c74abd2d120723c46a /tests/ui/array-slice-vec
parentb5a3acfe2b39c40d220bb9fc26b0719a7e073ac3 (diff)
parenta9bc7e99a32fe75bcc3d025ce8d08efb96b97cf9 (diff)
downloadrust-cf22ee0c0c86c0c60a3cee8a66bd361861e681b1.tar.gz
rust-cf22ee0c0c86c0c60a3cee8a66bd361861e681b1.zip
Auto merge of #3275 - rust-lang:rustup-2024-01-24, r=RalfJung
Automatic Rustup
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)]