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
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
166
166
= note: the raw bytes of the constant (size: 16, align: 8) {
Copy file name to clipboardExpand all lines: src/test/ui/consts/const-eval/format.stderr
+41-80Lines changed: 41 additions & 80 deletions
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,45 @@
1
-
error[E0015]: cannot call non-const formatting macro in constant functions
2
-
--> $DIR/format.rs:2:20
1
+
error[E0658]: mutable references are not allowed in constant functions
2
+
--> $DIR/format.rs:2:5
3
3
|
4
4
LL | panic!("{:?}", 0);
5
-
| ^
5
+
| ^^^^^^^^^^^^^^^^^
6
6
|
7
-
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
7
+
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
8
+
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
8
9
= 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
10
10
-
error[E0015]: cannot call non-const formatting macro in constant functions
11
-
--> $DIR/format.rs:11:22
11
+
error[E0658]: mutable references are not allowed in constant functions
12
+
--> $DIR/format.rs:2:5
12
13
|
13
-
LL | println!("{:?}", 0);
14
-
| ^
14
+
LL | panic!("{:?}", 0);
15
+
| ^^^^^^^^^^^^^^^^^
15
16
|
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::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
17
+
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
18
+
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
19
+
= 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
20
19
-
error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
20
-
--> $DIR/format.rs:11:5
21
+
error[E0658]: mutable references are not allowed in constant functions
22
+
--> $DIR/format.rs:2:5
23
+
|
24
+
LL | panic!("{:?}", 0);
25
+
| ^^^^^^^^^^^^^^^^^
26
+
|
27
+
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
28
+
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
29
+
= 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)
30
+
31
+
error[E0658]: mutable references are not allowed in constant functions
32
+
--> $DIR/format.rs:2:5
33
+
|
34
+
LL | panic!("{:?}", 0);
35
+
| ^^^^^^^^^^^^^^^^^
36
+
|
37
+
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
38
+
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
39
+
= 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)
40
+
41
+
error: `Arguments::<'a>::new` is not yet stable as a const fn
42
+
--> $DIR/format.rs:10:5
21
43
|
22
44
LL | println!("{:?}", 0);
23
45
| ^^^^^^^^^^^^^^^^^^^
@@ -26,7 +48,7 @@ LL | println!("{:?}", 0);
26
48
= 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
49
28
50
error[E0015]: cannot call non-const fn `_print` in constant functions
29
-
--> $DIR/format.rs:11:5
51
+
--> $DIR/format.rs:10:5
30
52
|
31
53
LL | println!("{:?}", 0);
32
54
| ^^^^^^^^^^^^^^^^^^^
@@ -35,84 +57,23 @@ LL | println!("{:?}", 0);
35
57
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
36
58
37
59
error: erroneous constant used
38
-
--> $DIR/format.rs:2:12
39
-
|
40
-
LL | panic!("{:?}", 0);
41
-
| ^^^^^^ referenced constant has errors
42
-
|
43
-
= note: `#[deny(const_err)]` on by default
44
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
45
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
46
-
47
-
error: erroneous constant used
48
-
--> $DIR/format.rs:2:20
49
-
|
50
-
LL | panic!("{:?}", 0);
51
-
| ^ referenced constant has errors
52
-
|
53
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
55
-
= 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)
56
-
57
-
error: erroneous constant used
58
-
--> $DIR/format.rs:11:14
59
-
|
60
-
LL | println!("{:?}", 0);
61
-
| ^^^^^^ referenced constant has errors
62
-
|
63
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
64
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
65
-
66
-
error: erroneous constant used
67
-
--> $DIR/format.rs:11:22
60
+
--> $DIR/format.rs:10:22
68
61
|
69
62
LL | println!("{:?}", 0);
70
63
| ^ referenced constant has errors
71
64
|
65
+
= note: `#[deny(const_err)]` on by default
72
66
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
73
67
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
74
68
= 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)
75
69
76
-
error: aborting due to 8 previous errors
70
+
error: aborting due to 7 previous errors
77
71
78
-
For more information about this error, try `rustc --explain E0015`.
72
+
Some errors have detailed explanations: E0015, E0658.
73
+
For more information about an error, try `rustc --explain E0015`.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
88
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
89
-
90
-
Future breakage diagnostic:
91
-
error: erroneous constant used
92
-
--> $DIR/format.rs:2:20
93
-
|
94
-
LL | panic!("{:?}", 0);
95
-
| ^ referenced constant has errors
96
-
|
97
-
= note: `#[deny(const_err)]` on by default
98
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
100
-
= 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)
101
-
102
-
Future breakage diagnostic:
103
-
error: erroneous constant used
104
-
--> $DIR/format.rs:11:14
105
-
|
106
-
LL | println!("{:?}", 0);
107
-
| ^^^^^^ referenced constant has errors
108
-
|
109
-
= note: `#[deny(const_err)]` on by default
110
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
111
-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
312
+
| ^^^^
315
313
= 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)
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
328
+
| ^^^^
333
329
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/fmt/ifmt-unimpl.stderr
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,7 @@ LL | format!("{:X}", "3");
15
15
NonZeroIsize
16
16
and 21 others
17
17
= note: required for `&str` to implement `UpperHex`
18
-
note: required by a bound in `ArgumentV1::<'a>::new_upper_hex`
19
-
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
20
-
|
21
-
LL | arg_new!(new_upper_hex, UpperHex);
22
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ArgumentV1::<'a>::new_upper_hex`
23
-
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `arg_new` (in Nightly builds, run with -Z macro-backtrace for more info)
18
+
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments