X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fcheck-static-values-constraints.stderr;h=b28cf0d6bd0f582808a27f90823e8595d040ee16;hb=d60b4f52c92facae291151dd5a23399f8044d01e;hp=eb640c88e026f1c487225f5a90aeff19d88350b9;hpb=cde7bdc678c52efd16baead2c9cb8eb3bf8be854;p=rust.git diff --git a/src/test/ui/check-static-values-constraints.stderr b/src/test/ui/check-static-values-constraints.stderr index eb640c88e02..b28cf0d6bd0 100644 --- a/src/test/ui/check-static-values-constraints.stderr +++ b/src/test/ui/check-static-values-constraints.stderr @@ -15,11 +15,13 @@ error[E0010]: allocations are not allowed in statics LL | static STATIC11: Box = box MyOwned; | ^^^^^^^^^^^ allocation not allowed in statics -error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants - --> $DIR/check-static-values-constraints.rs:89:32 +error[E0015]: cannot call non-const fn `::to_string` in statics + --> $DIR/check-static-values-constraints.rs:89:38 | LL | field2: SafeEnum::Variant4("str".to_string()) - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ + | + = note: calls in statics are limited to constant functions, tuple structs and tuple variants error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:94:5