You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/consts/const-eval/format.stderr
+19-10
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,35 @@ LL | panic!("{:?}", 0);
7
7
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
8
8
= 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)
9
9
10
+
error[E0015]: cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
11
+
--> $DIR/format.rs:2:5
12
+
|
13
+
LL | panic!("{:?}", 0);
14
+
| ^^^^^^^^^^^^^^^^^
15
+
|
16
+
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
17
+
= 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)
18
+
10
19
error[E0015]: cannot call non-const formatting macro in constant functions
11
-
--> $DIR/format.rs:7:22
20
+
--> $DIR/format.rs:8:22
12
21
|
13
22
LL | println!("{:?}", 0);
14
23
| ^
15
24
|
16
25
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
17
26
= 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)
18
27
19
-
error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
20
-
--> $DIR/format.rs:7:5
28
+
error[E0015]: cannot call non-const fn `Arguments::<'_>::new_v1` in constant functions
29
+
--> $DIR/format.rs:8:5
21
30
|
22
31
LL | println!("{:?}", 0);
23
32
| ^^^^^^^^^^^^^^^^^^^
24
33
|
25
-
= help: add `#![feature(const_fmt_arguments_new)]` to the crate attributes to enable
34
+
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
26
35
= 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)
27
36
28
37
error[E0015]: cannot call non-const fn `_print` in constant functions
29
-
--> $DIR/format.rs:7:5
38
+
--> $DIR/format.rs:8:5
30
39
|
31
40
LL | println!("{:?}", 0);
32
41
| ^^^^^^^^^^^^^^^^^^^
@@ -63,33 +72,33 @@ LL | panic!("{:?}", 0);
63
72
= 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)
64
73
65
74
note: erroneous constant used
66
-
--> $DIR/format.rs:7:14
75
+
--> $DIR/format.rs:8:14
67
76
|
68
77
LL | println!("{:?}", 0);
69
78
| ^^^^^^
70
79
71
80
note: erroneous constant used
72
-
--> $DIR/format.rs:7:14
81
+
--> $DIR/format.rs:8:14
73
82
|
74
83
LL | println!("{:?}", 0);
75
84
| ^^^^^^
76
85
77
86
note: erroneous constant used
78
-
--> $DIR/format.rs:7:22
87
+
--> $DIR/format.rs:8:22
79
88
|
80
89
LL | println!("{:?}", 0);
81
90
| ^
82
91
|
83
92
= 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)
84
93
85
94
note: erroneous constant used
86
-
--> $DIR/format.rs:7:22
95
+
--> $DIR/format.rs:8:22
87
96
|
88
97
LL | println!("{:?}", 0);
89
98
| ^
90
99
|
91
100
= 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)
92
101
93
-
error: aborting due to 4 previous errors
102
+
error: aborting due to 5 previous errors
94
103
95
104
For more information about this error, try `rustc --explain E0015`.
0 commit comments