summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-static-values-constraints.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/check-static-values-constraints.stderr (renamed from src/test/ui/check-static-values-constraints.stderr)11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/ui/check-static-values-constraints.stderr b/tests/ui/check-static-values-constraints.stderr
index 31939f7f6..490566784 100644
--- a/src/test/ui/check-static-values-constraints.stderr
+++ b/tests/ui/check-static-values-constraints.stderr
@@ -22,6 +22,7 @@ LL | field2: SafeEnum::Variant4("str".to_string())
| ^^^^^^^^^^^
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
+ = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
error[E0010]: allocations are not allowed in statics
@@ -58,10 +59,12 @@ error[E0507]: cannot move out of static item `x`
--> $DIR/check-static-values-constraints.rs:110:45
|
LL | let y = { static x: Box<isize> = box 3; x };
- | ^
- | |
- | move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
- | help: consider borrowing here: `&x`
+ | ^ move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let y = { static x: Box<isize> = box 3; &x };
+ | +
error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:110:38