about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-10-08 12:25:26 +0200
committerRalf Jung <post@ralfj.de>2024-10-08 14:03:03 +0200
commit287eb03838d5ff211706c8df8f5357034219472f (patch)
treee653891b2226caff6dd481433e5f726b445443e7 /tests/ui/error-codes
parentcf24c73141a77db730f4b7fda69dcd7e8b113b51 (diff)
downloadrust-287eb03838d5ff211706c8df8f5357034219472f.tar.gz
rust-287eb03838d5ff211706c8df8f5357034219472f.zip
fix/update teach_note from 'escaping mutable ref/ptr' const-check
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0010-teach.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/error-codes/E0010-teach.stderr b/tests/ui/error-codes/E0010-teach.stderr
index 7634970f36e..37a9892ccbf 100644
--- a/tests/ui/error-codes/E0010-teach.stderr
+++ b/tests/ui/error-codes/E0010-teach.stderr
@@ -4,7 +4,7 @@ error[E0010]: allocations are not allowed in constants
 LL | const CON: Vec<i32> = vec![1, 2, 3];
    |                       ^^^^^^^^^^^^^ allocation not allowed in constants
    |
-   = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
+   = note: The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created.
    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0015]: cannot call non-const fn `slice::<impl [i32]>::into_vec::<std::alloc::Global>` in constants