diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-11 16:38:48 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-28 09:19:42 +0000 |
| commit | 4e6e68e27a36f38da58dcbadd31c8f5d591f4571 (patch) | |
| tree | 84f8ff6144bbf8a8eda76939ca8994d61341b4c9 /src/test/ui/array-slice-vec | |
| parent | 0e7915d11f6888f005e78c2358fcdc48ff655753 (diff) | |
| download | rust-4e6e68e27a36f38da58dcbadd31c8f5d591f4571.tar.gz rust-4e6e68e27a36f38da58dcbadd31c8f5d591f4571.zip | |
Check that repeat expression elements are Copy (ignoring lifetimes) in typeck and that they are Copy (with proper lifetime checks) in borrowck
Diffstat (limited to 'src/test/ui/array-slice-vec')
| -rw-r--r-- | src/test/ui/array-slice-vec/repeat_empty_ok.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/array-slice-vec/repeat_empty_ok.stderr b/src/test/ui/array-slice-vec/repeat_empty_ok.stderr index eba1a8e2278..cf5efdaab2a 100644 --- a/src/test/ui/array-slice-vec/repeat_empty_ok.stderr +++ b/src/test/ui/array-slice-vec/repeat_empty_ok.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `Header<'_>: Copy` is not satisfied - --> $DIR/repeat_empty_ok.rs:8:19 + --> $DIR/repeat_empty_ok.rs:8:20 | LL | let headers = [Header{value: &[]}; 128]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>` | = note: the `Copy` trait is required because the repeated element will be copied help: consider annotating `Header<'_>` with `#[derive(Copy)]` @@ -11,10 +11,10 @@ LL | #[derive(Copy)] | error[E0277]: the trait bound `Header<'_>: Copy` is not satisfied - --> $DIR/repeat_empty_ok.rs:13:19 + --> $DIR/repeat_empty_ok.rs:13:20 | LL | let headers = [Header{value: &[0]}; 128]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>` + | ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>` | = note: the `Copy` trait is required because the repeated element will be copied help: consider annotating `Header<'_>` with `#[derive(Copy)]` |
