Skip to content

Commit 525b0bb

Browse files
committed
Bless tests.
1 parent a4dbcb5 commit 525b0bb

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

tests/ui/attributes/key-value-expansion.stderr

+1-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ LL | bug!();
1515
|
1616
= note: this error originates in the macro `bug` (in Nightly builds, run with -Z macro-backtrace for more info)
1717

18-
error: unexpected expression: `{
19-
let res =
20-
::alloc::fmt::format(::core::fmt::Arguments::new_v1(&[""],
21-
&[::core::fmt::ArgumentV1::new_display(&"u8")]));
22-
res
23-
}.as_str()`
18+
error: unexpected expression: `{ let res = ::alloc::fmt::format(format_args!("{0}", "u8")); res }.as_str()`
2419
--> $DIR/key-value-expansion.rs:48:23
2520
|
2621
LL | doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}

tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout

+18-18
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ fn arbitrary_consuming_method_for_demonstration_purposes() {
2525

2626

2727
{
28-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem as usize\nWith captures:\n elem = ",
29-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
28+
::std::rt::panic_fmt(format_args!("Assertion failed: elem as usize\nWith captures:\n elem = {0:?}\n",
29+
__capture0))
3030
}
3131
}
3232
};
@@ -41,8 +41,8 @@ fn addr_of() {
4141
if ::core::intrinsics::unlikely(!&*__local_bind0) {
4242
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
4343
{
44-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: &elem\nWith captures:\n elem = ",
45-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
44+
::std::rt::panic_fmt(format_args!("Assertion failed: &elem\nWith captures:\n elem = {0:?}\n",
45+
__capture0))
4646
}
4747
}
4848
};
@@ -57,8 +57,8 @@ fn binary() {
5757
if ::core::intrinsics::unlikely(!(*__local_bind0 == 1)) {
5858
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
5959
{
60-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem == 1\nWith captures:\n elem = ",
61-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
60+
::std::rt::panic_fmt(format_args!("Assertion failed: elem == 1\nWith captures:\n elem = {0:?}\n",
61+
__capture0))
6262
}
6363
}
6464
};
@@ -70,8 +70,8 @@ fn binary() {
7070
if ::core::intrinsics::unlikely(!(*__local_bind0 >= 1)) {
7171
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
7272
{
73-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem >= 1\nWith captures:\n elem = ",
74-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
73+
::std::rt::panic_fmt(format_args!("Assertion failed: elem >= 1\nWith captures:\n elem = {0:?}\n",
74+
__capture0))
7575
}
7676
}
7777
};
@@ -83,8 +83,8 @@ fn binary() {
8383
if ::core::intrinsics::unlikely(!(*__local_bind0 > 0)) {
8484
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
8585
{
86-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem > 0\nWith captures:\n elem = ",
87-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
86+
::std::rt::panic_fmt(format_args!("Assertion failed: elem > 0\nWith captures:\n elem = {0:?}\n",
87+
__capture0))
8888
}
8989
}
9090
};
@@ -96,8 +96,8 @@ fn binary() {
9696
if ::core::intrinsics::unlikely(!(*__local_bind0 < 3)) {
9797
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
9898
{
99-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem < 3\nWith captures:\n elem = ",
100-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
99+
::std::rt::panic_fmt(format_args!("Assertion failed: elem < 3\nWith captures:\n elem = {0:?}\n",
100+
__capture0))
101101
}
102102
}
103103
};
@@ -109,8 +109,8 @@ fn binary() {
109109
if ::core::intrinsics::unlikely(!(*__local_bind0 <= 3)) {
110110
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
111111
{
112-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem <= 3\nWith captures:\n elem = ",
113-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
112+
::std::rt::panic_fmt(format_args!("Assertion failed: elem <= 3\nWith captures:\n elem = {0:?}\n",
113+
__capture0))
114114
}
115115
}
116116
};
@@ -122,8 +122,8 @@ fn binary() {
122122
if ::core::intrinsics::unlikely(!(*__local_bind0 != 3)) {
123123
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
124124
{
125-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: elem != 3\nWith captures:\n elem = ",
126-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
125+
::std::rt::panic_fmt(format_args!("Assertion failed: elem != 3\nWith captures:\n elem = {0:?}\n",
126+
__capture0))
127127
}
128128
}
129129
};
@@ -138,8 +138,8 @@ fn unary() {
138138
if ::core::intrinsics::unlikely(!**__local_bind0) {
139139
(&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
140140
{
141-
::std::rt::panic_fmt(::core::fmt::Arguments::new_v1(&["Assertion failed: *elem\nWith captures:\n elem = ",
142-
"\n"], &[::core::fmt::ArgumentV1::new_debug(&__capture0)]))
141+
::std::rt::panic_fmt(format_args!("Assertion failed: *elem\nWith captures:\n elem = {0:?}\n",
142+
__capture0))
143143
}
144144
}
145145
};

0 commit comments

Comments
 (0)