diff options
| author | Ralf Jung <post@ralfj.de> | 2025-06-27 12:47:47 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-06-27 14:39:35 +0200 |
| commit | ed4f01ed2e033098f6c5e10a4a0cc740dc04f958 (patch) | |
| tree | 15991ee4b0a5dfcd7d04ec09b2a48681ded67293 /tests/ui/consts/recursive-static-write.stderr | |
| parent | e61dd437f33b5a640e67dc3628397689c664c17f (diff) | |
| download | rust-ed4f01ed2e033098f6c5e10a4a0cc740dc04f958.tar.gz rust-ed4f01ed2e033098f6c5e10a4a0cc740dc04f958.zip | |
const-eval: error when initializing a static writes to that static
Diffstat (limited to 'tests/ui/consts/recursive-static-write.stderr')
| -rw-r--r-- | tests/ui/consts/recursive-static-write.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/consts/recursive-static-write.stderr b/tests/ui/consts/recursive-static-write.stderr new file mode 100644 index 00000000000..f5b5c49317c --- /dev/null +++ b/tests/ui/consts/recursive-static-write.stderr @@ -0,0 +1,15 @@ +error[E0080]: encountered static that tried to access itself during initialization + --> $DIR/recursive-static-write.rs:13:9 + | +LL | (&raw const S.x).cast_mut().write(1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `S` failed here + +error[E0080]: encountered static that tried to access itself during initialization + --> $DIR/recursive-static-write.rs:20:9 + | +LL | S2.x = 1; + | ^^^^^^^^ evaluation of `S2` failed here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0080`. |
