]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/format.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / format.stderr
CommitLineData
923072b8
FG
1error[E0015]: cannot call non-const formatting macro in constant functions
2 --> $DIR/format.rs:2:20
3 |
4LL | panic!("{:?}", 0);
5 | ^
6 |
7 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
064997fb 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)
923072b8
FG
9
10error[E0015]: cannot call non-const formatting macro in constant functions
487cf647 11 --> $DIR/format.rs:7:22
923072b8
FG
12 |
13LL | println!("{:?}", 0);
14 | ^
15 |
16 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
064997fb 17 = 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)
923072b8
FG
18
19error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
487cf647 20 --> $DIR/format.rs:7:5
923072b8
FG
21 |
22LL | println!("{:?}", 0);
23 | ^^^^^^^^^^^^^^^^^^^
24 |
25 = help: add `#![feature(const_fmt_arguments_new)]` to the crate attributes to enable
064997fb 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)
923072b8
FG
27
28error[E0015]: cannot call non-const fn `_print` in constant functions
487cf647 29 --> $DIR/format.rs:7:5
923072b8
FG
30 |
31LL | println!("{:?}", 0);
32 | ^^^^^^^^^^^^^^^^^^^
33 |
34 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
35 = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
36
487cf647 37note: erroneous constant used
923072b8
FG
38 --> $DIR/format.rs:2:12
39 |
40LL | panic!("{:?}", 0);
487cf647 41 | ^^^^^^
923072b8 42
487cf647
FG
43note: erroneous constant used
44 --> $DIR/format.rs:2:12
45 |
46LL | panic!("{:?}", 0);
47 | ^^^^^^
48
49note: erroneous constant used
923072b8
FG
50 --> $DIR/format.rs:2:20
51 |
52LL | panic!("{:?}", 0);
487cf647 53 | ^
923072b8 54 |
487cf647
FG
55 = 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)
56
57note: erroneous constant used
58 --> $DIR/format.rs:2:20
59 |
60LL | panic!("{:?}", 0);
61 | ^
62 |
63 = 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)
923072b8 64
487cf647
FG
65note: erroneous constant used
66 --> $DIR/format.rs:7:14
923072b8
FG
67 |
68LL | println!("{:?}", 0);
487cf647 69 | ^^^^^^
923072b8 70
487cf647
FG
71note: erroneous constant used
72 --> $DIR/format.rs:7:14
923072b8
FG
73 |
74LL | println!("{:?}", 0);
487cf647
FG
75 | ^^^^^^
76
77note: erroneous constant used
78 --> $DIR/format.rs:7:22
923072b8 79 |
487cf647
FG
80LL | println!("{:?}", 0);
81 | ^
82 |
83 = 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
85note: erroneous constant used
86 --> $DIR/format.rs:7:22
87 |
88LL | println!("{:?}", 0);
89 | ^
90 |
91 = 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)
923072b8 92
487cf647 93error: aborting due to 4 previous errors
923072b8 94
487cf647 95For more information about this error, try `rustc --explain E0015`.