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/control-flow/issue-46843.stderr | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/ui/consts/control-flow/issue-46843.stderr (limited to 'tests/ui/consts/control-flow/issue-46843.stderr') diff --git a/tests/ui/consts/control-flow/issue-46843.stderr b/tests/ui/consts/control-flow/issue-46843.stderr new file mode 100644 index 000000000..66227f61e --- /dev/null +++ b/tests/ui/consts/control-flow/issue-46843.stderr @@ -0,0 +1,11 @@ +error[E0015]: cannot call non-const fn `non_const` in constants + --> $DIR/issue-46843.rs:10:26 + | +LL | pub const Q: i32 = match non_const() { + | ^^^^^^^^^^^ + | + = note: calls in constants are limited to constant functions, tuple structs and tuple variants + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0015`. -- cgit v1.2.3