summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-blocks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-blocks')
-rw-r--r--tests/ui/consts/const-blocks/fn-call-in-non-const.stderr3
-rw-r--r--tests/ui/consts/const-blocks/migrate-fail.stderr6
-rw-r--r--tests/ui/consts/const-blocks/nll-fail.stderr6
3 files changed, 10 insertions, 5 deletions
diff --git a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
index ee352700c..174103eeb 100644
--- a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
+++ b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
@@ -10,7 +10,8 @@ LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
= help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information
help: consider annotating `Bar` with `#[derive(Copy)]`
|
-LL | #[derive(Copy)]
+LL + #[derive(Copy)]
+LL | struct Bar;
|
error: aborting due to previous error
diff --git a/tests/ui/consts/const-blocks/migrate-fail.stderr b/tests/ui/consts/const-blocks/migrate-fail.stderr
index 928ffd083..d1896f755 100644
--- a/tests/ui/consts/const-blocks/migrate-fail.stderr
+++ b/tests/ui/consts/const-blocks/migrate-fail.stderr
@@ -8,7 +8,8 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: consider annotating `Bar` with `#[derive(Copy)]`
|
-LL | #[derive(Copy)]
+LL + #[derive(Copy)]
+LL | struct Bar;
|
error[E0277]: the trait bound `Bar: Copy` is not satisfied
@@ -21,7 +22,8 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: consider annotating `Bar` with `#[derive(Copy)]`
|
-LL | #[derive(Copy)]
+LL + #[derive(Copy)]
+LL | struct Bar;
|
error: aborting due to 2 previous errors
diff --git a/tests/ui/consts/const-blocks/nll-fail.stderr b/tests/ui/consts/const-blocks/nll-fail.stderr
index fede00845..807c964a5 100644
--- a/tests/ui/consts/const-blocks/nll-fail.stderr
+++ b/tests/ui/consts/const-blocks/nll-fail.stderr
@@ -8,7 +8,8 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: consider annotating `Bar` with `#[derive(Copy)]`
|
-LL | #[derive(Copy)]
+LL + #[derive(Copy)]
+LL | struct Bar;
|
error[E0277]: the trait bound `Bar: Copy` is not satisfied
@@ -21,7 +22,8 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: consider annotating `Bar` with `#[derive(Copy)]`
|
-LL | #[derive(Copy)]
+LL + #[derive(Copy)]
+LL | struct Bar;
|
error: aborting due to 2 previous errors