Skip to content

Commit 95f1fe4

Browse files
committed
Update tests.
1 parent 5f1950c commit 95f1fe4

6 files changed

+95
-78
lines changed

src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff

+37-30
Original file line numberDiff line numberDiff line change
@@ -30,55 +30,62 @@
3030
scope 3 {
3131
debug precision => _10; // in scope 3 at $DIR/funky_arms.rs:+13:17: +13:26
3232
let _10: usize; // in scope 3 at $DIR/funky_arms.rs:+13:17: +13:26
33+
scope 5 (inlined Formatter::precision) { // at $DIR/funky_arms.rs:24:30: 24:45
34+
debug self => _8; // in scope 5 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
35+
}
3336
}
3437
}
3538
}
39+
scope 4 (inlined Formatter::sign_plus) { // at $DIR/funky_arms.rs:15:22: 15:37
40+
debug self => _5; // in scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
41+
let mut _22: u32; // in scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
42+
let mut _23: u32; // in scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
43+
let mut _24: u32; // in scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
44+
}
3645

3746
bb0: {
3847
StorageLive(_4); // scope 0 at $DIR/funky_arms.rs:+4:9: +4:19
3948
StorageLive(_5); // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
4049
_5 = &(*_1); // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
41-
_4 = Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
42-
// mir::Constant
43-
// + span: $DIR/funky_arms.rs:15:26: 15:35
44-
// + literal: Const { ty: for<'r> fn(&'r Formatter) -> bool {Formatter::sign_plus}, val: Value(<ZST>) }
45-
}
46-
47-
bb1: {
50+
StorageLive(_22); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
51+
StorageLive(_23); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
52+
_23 = ((*_5).0: u32); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
53+
StorageLive(_24); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
54+
_24 = const 1_u32; // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
55+
- _22 = BitAnd(move _23, move _24); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
56+
+ _22 = BitAnd(move _23, const 1_u32); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
57+
StorageDead(_24); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
58+
StorageDead(_23); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
59+
_4 = Ne(move _22, const 0_u32); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
60+
StorageDead(_22); // scope 4 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
4861
StorageDead(_5); // scope 0 at $DIR/funky_arms.rs:+4:36: +4:37
4962
StorageLive(_6); // scope 1 at $DIR/funky_arms.rs:+8:9: +8:13
50-
switchInt(_4) -> [false: bb3, otherwise: bb2]; // scope 1 at $DIR/funky_arms.rs:+8:16: +8:32
63+
switchInt(_4) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/funky_arms.rs:+8:16: +8:32
5164
}
5265

53-
bb2: {
66+
bb1: {
5467
Deinit(_6); // scope 1 at $DIR/funky_arms.rs:+10:17: +10:41
5568
discriminant(_6) = 1; // scope 1 at $DIR/funky_arms.rs:+10:17: +10:41
56-
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:+10:17: +10:41
69+
goto -> bb3; // scope 1 at $DIR/funky_arms.rs:+10:17: +10:41
5770
}
5871

59-
bb3: {
72+
bb2: {
6073
Deinit(_6); // scope 1 at $DIR/funky_arms.rs:+9:18: +9:38
6174
discriminant(_6) = 0; // scope 1 at $DIR/funky_arms.rs:+9:18: +9:38
62-
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:+9:18: +9:38
75+
goto -> bb3; // scope 1 at $DIR/funky_arms.rs:+9:18: +9:38
6376
}
6477

65-
bb4: {
78+
bb3: {
6679
StorageLive(_7); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
6780
StorageLive(_8); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
6881
_8 = &(*_1); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
69-
_7 = Formatter::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
70-
// mir::Constant
71-
// + span: $DIR/funky_arms.rs:24:34: 24:43
72-
// + literal: Const { ty: for<'r> fn(&'r Formatter) -> Option<usize> {Formatter::precision}, val: Value(<ZST>) }
73-
}
74-
75-
bb5: {
82+
_7 = ((*_8).4: std::option::Option<usize>); // scope 5 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
7683
StorageDead(_8); // scope 3 at $DIR/funky_arms.rs:+13:44: +13:45
7784
_9 = discriminant(_7); // scope 3 at $DIR/funky_arms.rs:+13:12: +13:27
78-
switchInt(move _9) -> [1_isize: bb6, otherwise: bb8]; // scope 3 at $DIR/funky_arms.rs:+13:12: +13:27
85+
switchInt(move _9) -> [1_isize: bb4, otherwise: bb6]; // scope 3 at $DIR/funky_arms.rs:+13:12: +13:27
7986
}
8087

81-
bb6: {
88+
bb4: {
8289
StorageLive(_10); // scope 3 at $DIR/funky_arms.rs:+13:17: +13:26
8390
_10 = ((_7 as Some).0: usize); // scope 3 at $DIR/funky_arms.rs:+13:17: +13:26
8491
StorageLive(_11); // scope 3 at $DIR/funky_arms.rs:+15:43: +15:46
@@ -97,23 +104,23 @@
97104
StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:+15:78: +15:79
98105
StorageLive(_17); // scope 3 at $DIR/funky_arms.rs:+15:81: +15:86
99106
_17 = _3; // scope 3 at $DIR/funky_arms.rs:+15:81: +15:86
100-
_0 = float_to_exponential_common_exact::<T>(move _11, move _12, move _13, move _14, move _17) -> bb7; // scope 3 at $DIR/funky_arms.rs:+15:9: +15:87
107+
_0 = float_to_exponential_common_exact::<T>(move _11, move _12, move _13, move _14, move _17) -> bb5; // scope 3 at $DIR/funky_arms.rs:+15:9: +15:87
101108
// mir::Constant
102109
// + span: $DIR/funky_arms.rs:26:9: 26:42
103110
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
104111
}
105112

106-
bb7: {
113+
bb5: {
107114
StorageDead(_17); // scope 3 at $DIR/funky_arms.rs:+15:86: +15:87
108115
StorageDead(_14); // scope 3 at $DIR/funky_arms.rs:+15:86: +15:87
109116
StorageDead(_13); // scope 3 at $DIR/funky_arms.rs:+15:86: +15:87
110117
StorageDead(_12); // scope 3 at $DIR/funky_arms.rs:+15:86: +15:87
111118
StorageDead(_11); // scope 3 at $DIR/funky_arms.rs:+15:86: +15:87
112119
StorageDead(_10); // scope 2 at $DIR/funky_arms.rs:+16:5: +16:6
113-
goto -> bb10; // scope 2 at $DIR/funky_arms.rs:+13:5: +18:6
120+
goto -> bb8; // scope 2 at $DIR/funky_arms.rs:+13:5: +18:6
114121
}
115122

116-
bb8: {
123+
bb6: {
117124
StorageLive(_18); // scope 2 at $DIR/funky_arms.rs:+17:46: +17:49
118125
_18 = &mut (*_1); // scope 2 at $DIR/funky_arms.rs:+17:46: +17:49
119126
StorageLive(_19); // scope 2 at $DIR/funky_arms.rs:+17:51: +17:54
@@ -122,21 +129,21 @@
122129
_20 = _6; // scope 2 at $DIR/funky_arms.rs:+17:56: +17:60
123130
StorageLive(_21); // scope 2 at $DIR/funky_arms.rs:+17:62: +17:67
124131
_21 = _3; // scope 2 at $DIR/funky_arms.rs:+17:62: +17:67
125-
_0 = float_to_exponential_common_shortest::<T>(move _18, move _19, move _20, move _21) -> bb9; // scope 2 at $DIR/funky_arms.rs:+17:9: +17:68
132+
_0 = float_to_exponential_common_shortest::<T>(move _18, move _19, move _20, move _21) -> bb7; // scope 2 at $DIR/funky_arms.rs:+17:9: +17:68
126133
// mir::Constant
127134
// + span: $DIR/funky_arms.rs:28:9: 28:45
128135
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
129136
}
130137

131-
bb9: {
138+
bb7: {
132139
StorageDead(_21); // scope 2 at $DIR/funky_arms.rs:+17:67: +17:68
133140
StorageDead(_20); // scope 2 at $DIR/funky_arms.rs:+17:67: +17:68
134141
StorageDead(_19); // scope 2 at $DIR/funky_arms.rs:+17:67: +17:68
135142
StorageDead(_18); // scope 2 at $DIR/funky_arms.rs:+17:67: +17:68
136-
goto -> bb10; // scope 2 at $DIR/funky_arms.rs:+13:5: +18:6
143+
goto -> bb8; // scope 2 at $DIR/funky_arms.rs:+13:5: +18:6
137144
}
138145

139-
bb10: {
146+
bb8: {
140147
StorageDead(_6); // scope 1 at $DIR/funky_arms.rs:+19:1: +19:2
141148
StorageDead(_4); // scope 0 at $DIR/funky_arms.rs:+19:1: +19:2
142149
StorageDead(_7); // scope 0 at $DIR/funky_arms.rs:+19:1: +19:2

src/test/ui/attributes/key-value-expansion.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ error: unexpected expression: `{
1919
let res =
2020
::alloc::fmt::format(::core::fmt::Arguments::new(&match (&"u8",) {
2121
_args =>
22-
|f: &mut ::core::fmt::Formatter<'_>| -> ::core::fmt::Result
22+
|w: &mut dyn ::core::fmt::Write| -> ::core::fmt::Result
2323
{
24-
::core::fmt::Display::fmt(_args.0, f)?;
24+
::core::fmt::Display::fmt(_args.0,
25+
&mut ::core::fmt::Formatter::new(w))?;
2526
::core::result::Result::Ok(())
2627
},
2728
}));

src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | let c1 : () = c;
99
| expected due to this
1010
|
1111
= note: expected unit type `()`
12-
found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#88t, extern "rust-call" fn(()), _#89t]]`
12+
found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#94t, extern "rust-call" fn(()), _#95t]]`
1313
help: use parentheses to call this closure
1414
|
1515
LL | let c1 : () = c();

src/test/ui/closures/print/closure-print-generic-verbose-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | let c1 : () = c;
99
| expected due to this
1010
|
1111
= note: expected unit type `()`
12-
found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#88t, extern "rust-call" fn(()), _#89t]]`
12+
found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#94t, extern "rust-call" fn(()), _#95t]]`
1313
help: use parentheses to call this closure
1414
|
1515
LL | let c1 : () = c();

src/test/ui/fmt/send-sync.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
error[E0277]: `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
1+
error[E0277]: `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
22
--> $DIR/send-sync.rs:8:10
33
|
44
LL | send(format_args!("{:?}", c));
5-
| ---- ^^^^^^^^^^^^^^^^^^^^^^^ `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
5+
| ---- ^^^^^^^^^^^^^^^^^^^^^^^ `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
66
| |
77
| required by a bound introduced by this call
88
|
9-
= help: the trait `Sync` is not implemented for `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>`
10-
= note: required for `&dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>` to implement `Send`
9+
= help: the trait `Sync` is not implemented for `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>`
10+
= note: required for `&dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>` to implement `Send`
1111
= note: required because it appears within the type `core::fmt::Inner<'_>`
1212
= note: required because it appears within the type `Arguments<'_>`
1313
note: required by a bound in `send`
@@ -16,16 +16,16 @@ note: required by a bound in `send`
1616
LL | fn send<T: Send>(_: T) {}
1717
| ^^^^ required by this bound in `send`
1818

19-
error[E0277]: `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
19+
error[E0277]: `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
2020
--> $DIR/send-sync.rs:9:10
2121
|
2222
LL | sync(format_args!("{:?}", c));
23-
| ---- ^^^^^^^^^^^^^^^^^^^^^^^ `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
23+
| ---- ^^^^^^^^^^^^^^^^^^^^^^^ `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>` cannot be shared between threads safely
2424
| |
2525
| required by a bound introduced by this call
2626
|
27-
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>`
28-
= note: required because it appears within the type `&dyn for<'r, 's> Fn(&'r mut Formatter<'s>) -> Result<(), std::fmt::Error>`
27+
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>`
28+
= note: required because it appears within the type `&dyn for<'r> Fn(&'r mut (dyn std::fmt::Write + 'r)) -> Result<(), std::fmt::Error>`
2929
= note: required because it appears within the type `core::fmt::Inner<'_>`
3030
= note: required because it appears within the type `Arguments<'_>`
3131
note: required by a bound in `sync`

0 commit comments

Comments
 (0)