about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/borrowck/issue-64453.stderr2
-rw-r--r--tests/ui/consts/const-eval/format.rs3
-rw-r--r--tests/ui/consts/const-eval/format.stderr29
3 files changed, 22 insertions, 12 deletions
diff --git a/tests/ui/borrowck/issue-64453.stderr b/tests/ui/borrowck/issue-64453.stderr
index 245c3a40e05..f032ea779dd 100644
--- a/tests/ui/borrowck/issue-64453.stderr
+++ b/tests/ui/borrowck/issue-64453.stderr
@@ -1,4 +1,4 @@
-error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
+error: `Arguments::<'a>::new_const` is not yet stable as a const fn
   --> $DIR/issue-64453.rs:4:31
    |
 LL | static settings_dir: String = format!("");
diff --git a/tests/ui/consts/const-eval/format.rs b/tests/ui/consts/const-eval/format.rs
index 0d8b7c12d8a..5bdb2bf1954 100644
--- a/tests/ui/consts/const-eval/format.rs
+++ b/tests/ui/consts/const-eval/format.rs
@@ -1,12 +1,13 @@
 const fn failure() {
     panic!("{:?}", 0);
     //~^ ERROR cannot call non-const formatting macro in constant functions
+    //~| ERROR cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
 }
 
 const fn print() {
     println!("{:?}", 0);
     //~^ ERROR cannot call non-const formatting macro in constant functions
-    //~| ERROR `Arguments::<'a>::new_v1` is not yet stable as a const fn
+    //~| ERROR cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
     //~| ERROR cannot call non-const fn `_print` in constant functions
 }
 
diff --git a/tests/ui/consts/const-eval/format.stderr b/tests/ui/consts/const-eval/format.stderr
index 4bf39db5874..c39920d444d 100644
--- a/tests/ui/consts/const-eval/format.stderr
+++ b/tests/ui/consts/const-eval/format.stderr
@@ -7,8 +7,17 @@ LL |     panic!("{:?}", 0);
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
    = note: this error originates in the macro `$crate::const_format_args` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
+error[E0015]: cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
+  --> $DIR/format.rs:2:5
+   |
+LL |     panic!("{:?}", 0);
+   |     ^^^^^^^^^^^^^^^^^
+   |
+   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+   = note: this error originates in the macro `$crate::const_format_args` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error[E0015]: cannot call non-const formatting macro in constant functions
-  --> $DIR/format.rs:7:22
+  --> $DIR/format.rs:8:22
    |
 LL |     println!("{:?}", 0);
    |                      ^
@@ -16,17 +25,17 @@ LL |     println!("{:?}", 0);
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
-  --> $DIR/format.rs:7:5
+error[E0015]: cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
+  --> $DIR/format.rs:8:5
    |
 LL |     println!("{:?}", 0);
    |     ^^^^^^^^^^^^^^^^^^^
    |
-   = help: add `#![feature(const_fmt_arguments_new)]` to the crate attributes to enable
+   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0015]: cannot call non-const fn `_print` in constant functions
-  --> $DIR/format.rs:7:5
+  --> $DIR/format.rs:8:5
    |
 LL |     println!("{:?}", 0);
    |     ^^^^^^^^^^^^^^^^^^^
@@ -63,19 +72,19 @@ LL |     panic!("{:?}", 0);
    = note: this note originates in the macro `$crate::const_format_args` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 note: erroneous constant used
-  --> $DIR/format.rs:7:14
+  --> $DIR/format.rs:8:14
    |
 LL |     println!("{:?}", 0);
    |              ^^^^^^
 
 note: erroneous constant used
-  --> $DIR/format.rs:7:14
+  --> $DIR/format.rs:8:14
    |
 LL |     println!("{:?}", 0);
    |              ^^^^^^
 
 note: erroneous constant used
-  --> $DIR/format.rs:7:22
+  --> $DIR/format.rs:8:22
    |
 LL |     println!("{:?}", 0);
    |                      ^
@@ -83,13 +92,13 @@ LL |     println!("{:?}", 0);
    = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 note: erroneous constant used
-  --> $DIR/format.rs:7:22
+  --> $DIR/format.rs:8:22
    |
 LL |     println!("{:?}", 0);
    |                      ^
    |
    = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0015`.