From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/consts/const-eval/const_let.stderr | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/ui/consts/const-eval/const_let.stderr (limited to 'tests/ui/consts/const-eval/const_let.stderr') diff --git a/tests/ui/consts/const-eval/const_let.stderr b/tests/ui/consts/const-eval/const_let.stderr new file mode 100644 index 000000000..63442f557 --- /dev/null +++ b/tests/ui/consts/const-eval/const_let.stderr @@ -0,0 +1,35 @@ +error[E0493]: destructor of `FakeNeedsDrop` cannot be evaluated at compile-time + --> $DIR/const_let.rs:16:32 + | +LL | const Y: FakeNeedsDrop = { let mut x = FakeNeedsDrop; x = FakeNeedsDrop; x }; + | ^^^^^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constants + +error[E0493]: destructor of `FakeNeedsDrop` cannot be evaluated at compile-time + --> $DIR/const_let.rs:20:33 + | +LL | const Y2: FakeNeedsDrop = { let mut x; x = FakeNeedsDrop; x = FakeNeedsDrop; x }; + | ^^^^^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constants + +error[E0493]: destructor of `Option` cannot be evaluated at compile-time + --> $DIR/const_let.rs:24:21 + | +LL | const Z: () = { let mut x = None; x = Some(FakeNeedsDrop); }; + | ^^^^^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constants + +error[E0493]: destructor of `Option` cannot be evaluated at compile-time + --> $DIR/const_let.rs:28:22 + | +LL | const Z2: () = { let mut x; x = None; x = Some(FakeNeedsDrop); }; + | ^^^^^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constants + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0493`. -- cgit v1.2.3