about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/format.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-eval/format.rs')
-rw-r--r--tests/ui/consts/const-eval/format.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/consts/const-eval/format.rs b/tests/ui/consts/const-eval/format.rs
index 1878fc03827..a8085a786e1 100644
--- a/tests/ui/consts/const-eval/format.rs
+++ b/tests/ui/consts/const-eval/format.rs
@@ -9,4 +9,9 @@ const fn print() {
     //~| ERROR cannot call non-const function `_print` in constant functions
 }
 
+const fn format_args() {
+    format_args!("{}", 0);
+    //~^ ERROR cannot call non-const formatting macro in constant functions
+}
+
 fn main() {}