Skip to content

Commit 99c916d

Browse files
committed
Bless mir-opt.
1 parent cd44af1 commit 99c916d

32 files changed

+95
-96
lines changed

src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
_2 = <T as Clone>::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
2525
// mir::Constant
2626
// + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9
27-
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
27+
// + literal: Const { ty: fn(&T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
2828
}
2929

3030
bb1: {
@@ -34,13 +34,11 @@
3434
StorageLive(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
3535
_7 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
3636
- _6 = &(*_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
37-
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
38-
- // mir::Constant
39-
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
40-
- // + literal: Const { ty: for<'a> fn(&'a u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
4137
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
42-
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
43-
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
38+
_5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
39+
// mir::Constant
40+
// + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
41+
// + literal: Const { ty: fn(&u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
4442
}
4543

4644
bb2: {
@@ -50,13 +48,11 @@
5048
StorageLive(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5149
_10 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5250
- _9 = &(*_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
53-
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
54-
- // mir::Constant
55-
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
56-
- // + literal: Const { ty: for<'a> fn(&'a [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
5751
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
58-
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
59-
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
52+
_8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
53+
// mir::Constant
54+
// + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
55+
// + literal: Const { ty: fn(&[f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
6056
}
6157

6258
bb3: {

src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
3434
// mir::Constant
3535
// + span: $DIR/const-promotion-extern-static.rs:9:36: 9:42
36-
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
36+
// + literal: Const { ty: fn(&[&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
3737
}
3838

3939
bb1: {

src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
3636
// mir::Constant
3737
// + span: $DIR/const-promotion-extern-static.rs:13:47: 13:53
38-
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
38+
// + literal: Const { ty: fn(&[&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
3939
}
4040

4141
bb1: {

src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
_2 = core::str::<impl str>::as_bytes(move _3) -> bb1; // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
2121
// mir::Constant
2222
// + span: $DIR/deduplicate_blocks.rs:5:13: 5:21
23-
// + literal: Const { ty: for<'a> fn(&'a str) -> &'a [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
23+
// + literal: Const { ty: fn(&str) -> &[u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
2424
}
2525

2626
bb1: {

src/test/mir-opt/derefer_complex_case.main.Derefer.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
_7 = <std::slice::Iter<'_, i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
5757
// mir::Constant
5858
// + span: $DIR/derefer_complex_case.rs:6:17: 6:26
59-
// + literal: Const { ty: for<'a> fn(&'a mut std::slice::Iter<'_, i32>) -> Option<<std::slice::Iter<'_, i32> as Iterator>::Item> {<std::slice::Iter<'_, i32> as Iterator>::next}, val: Value(<ZST>) }
59+
// + literal: Const { ty: fn(&mut std::slice::Iter<'_, i32>) -> Option<<std::slice::Iter<'_, i32> as Iterator>::Item> {<std::slice::Iter<'_, i32> as Iterator>::next}, val: Value(<ZST>) }
6060
}
6161

6262
bb3: {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
_4 = Formatter::<'_>::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
4242
// mir::Constant
4343
// + span: $DIR/funky_arms.rs:15:26: 15:35
44-
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
44+
// + literal: Const { ty: fn(&Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
4545
}
4646

4747
bb1: {
@@ -69,7 +69,7 @@
6969
_7 = Formatter::<'_>::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
7070
// mir::Constant
7171
// + span: $DIR/funky_arms.rs:24:34: 24:43
72-
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
72+
// + literal: Const { ty: fn(&Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
7373
}
7474

7575
bb5: {
@@ -97,10 +97,10 @@
9797
StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:+15:78: +15:79
9898
StorageLive(_17); // scope 3 at $DIR/funky_arms.rs:+15:81: +15:86
9999
_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
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
101101
// mir::Constant
102102
// + span: $DIR/funky_arms.rs:26:9: 26:42
103-
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
103+
// + literal: Const { ty: fn(&mut Formatter<'_>, &T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T, '_, '_, '_>}, val: Value(<ZST>) }
104104
}
105105

106106
bb7: {
@@ -122,10 +122,10 @@
122122
_20 = _6; // scope 2 at $DIR/funky_arms.rs:+17:56: +17:60
123123
StorageLive(_21); // scope 2 at $DIR/funky_arms.rs:+17:62: +17:67
124124
_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
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
126126
// mir::Constant
127127
// + span: $DIR/funky_arms.rs:28:9: 28:45
128-
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
128+
// + literal: Const { ty: fn(&mut Formatter<'_>, &T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T, '_, '_, '_>}, val: Value(<ZST>) }
129129
}
130130

131131
bb9: {

src/test/mir-opt/inline/cycle.f.Inline.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
_2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:+1:5: +1:8
1818
// mir::Constant
1919
// + span: $DIR/cycle.rs:6:5: 6:6
20-
// + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
20+
// + literal: Const { ty: extern "rust-call" fn(&impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
2121
}
2222

2323
bb1: {

src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
let mut _4: &<Q as Query>::C; // in scope 0 at $DIR/dyn-trait.rs:+2:23: +2:24
1010
scope 1 {
1111
debug c => _2; // in scope 1 at $DIR/dyn-trait.rs:+1:9: +1:10
12-
+ scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn-trait.rs:34:5: 34:25
12+
+ scope 2 (inlined try_execute_query::<<Q as Query>::C, '_>) { // at $DIR/dyn-trait.rs:34:5: 34:25
1313
+ debug c => _4; // in scope 2 at $DIR/dyn-trait.rs:26:36: 26:37
1414
+ let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
1515
+ let mut _6: &<Q as Query>::C; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
16-
+ scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16
16+
+ scope 3 (inlined mk_cycle::<<Q as Query>::V, '_>) { // at $DIR/dyn-trait.rs:27:5: 27:16
1717
+ debug c => _5; // in scope 3 at $DIR/dyn-trait.rs:20:27: 20:28
1818
+ let mut _7: &dyn Cache<V = <Q as Query>::V>; // in scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
1919
+ }
@@ -24,18 +24,18 @@
2424
StorageLive(_2); // scope 0 at $DIR/dyn-trait.rs:+1:9: +1:10
2525
StorageLive(_3); // scope 0 at $DIR/dyn-trait.rs:+1:22: +1:23
2626
_3 = &(*_1); // scope 0 at $DIR/dyn-trait.rs:+1:22: +1:23
27-
_2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:13: +1:24
27+
_2 = <Q as Query>::cache::<T, '_>(move _3) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:13: +1:24
2828
// mir::Constant
2929
// + span: $DIR/dyn-trait.rs:33:13: 33:21
3030
// + user_ty: UserType(0)
31-
// + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
31+
// + literal: Const { ty: fn(&T) -> &<Q as Query>::C {<Q as Query>::cache::<T, '_>}, val: Value(<ZST>) }
3232
}
3333

3434
bb1: {
3535
StorageDead(_3); // scope 0 at $DIR/dyn-trait.rs:+1:23: +1:24
3636
StorageLive(_4); // scope 1 at $DIR/dyn-trait.rs:+2:23: +2:24
3737
_4 = &(*_2); // scope 1 at $DIR/dyn-trait.rs:+2:23: +2:24
38-
- _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn-trait.rs:+2:5: +2:25
38+
- _0 = try_execute_query::<<Q as Query>::C, '_>(move _4) -> bb2; // scope 1 at $DIR/dyn-trait.rs:+2:5: +2:25
3939
+ StorageLive(_5); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
4040
+ StorageLive(_6); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
4141
+ _6 = _4; // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
@@ -46,9 +46,9 @@
4646
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
4747
// mir::Constant
4848
- // + span: $DIR/dyn-trait.rs:34:5: 34:22
49-
- // + literal: Const { ty: for<'a> fn(&'a <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
49+
- // + literal: Const { ty: fn(&<Q as Query>::C) {try_execute_query::<<Q as Query>::C, '_>}, val: Value(<ZST>) }
5050
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20
51-
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
51+
+ // + literal: Const { ty: fn(&dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
5252
}
5353

5454
bb2: {

src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
_0 = <dyn Cache<V = V> as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
1313
// mir::Constant
1414
// + span: $DIR/dyn-trait.rs:21:7: 21:20
15-
// + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
15+
// + literal: Const { ty: fn(&dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
1616
}
1717

1818
bb1: {

src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
let mut _0: (); // return place in scope 0 at $DIR/dyn-trait.rs:+0:43: +0:43
77
let mut _2: &dyn Cache<V = <C as Cache>::V>; // in scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
88
let mut _3: &C; // in scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
9-
+ scope 1 (inlined mk_cycle::<<C as Cache>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16
9+
+ scope 1 (inlined mk_cycle::<<C as Cache>::V, '_>) { // at $DIR/dyn-trait.rs:27:5: 27:16
1010
+ debug c => _2; // in scope 1 at $DIR/dyn-trait.rs:20:27: 20:28
1111
+ let mut _4: &dyn Cache<V = <C as Cache>::V>; // in scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
1212
+ }
@@ -17,15 +17,15 @@
1717
_3 = &(*_1); // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
1818
_2 = move _3 as &dyn Cache<V = <C as Cache>::V> (Pointer(Unsize)); // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
1919
StorageDead(_3); // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
20-
- _0 = mk_cycle::<<C as Cache>::V>(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:16
20+
- _0 = mk_cycle::<<C as Cache>::V, '_>(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:16
2121
+ StorageLive(_4); // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
2222
+ _4 = _2; // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
2323
+ _0 = <dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache(move _4) -> bb1; // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
2424
// mir::Constant
2525
- // + span: $DIR/dyn-trait.rs:27:5: 27:13
26-
- // + literal: Const { ty: for<'a> fn(&'a (dyn Cache<V = <C as Cache>::V> + 'a)) {mk_cycle::<<C as Cache>::V>}, val: Value(<ZST>) }
26+
- // + literal: Const { ty: fn(&dyn Cache<V = <C as Cache>::V>) {mk_cycle::<<C as Cache>::V, '_>}, val: Value(<ZST>) }
2727
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20
28-
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <C as Cache>::V>) {<dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
28+
+ // + literal: Const { ty: fn(&dyn Cache<V = <C as Cache>::V>) {<dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
2929
}
3030

3131
bb1: {

0 commit comments

Comments
 (0)