Skip to content

Commit 6118ee3

Browse files
committed
address review
1 parent 897adb8 commit 6118ee3

File tree

108 files changed

+214
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+214
-213
lines changed

compiler/rustc_middle/src/ty/print/pretty.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
21282128
if let Some(name) = available_names.pop() {
21292129
name
21302130
} else {
2131-
Symbol::intern(&format!("'t{}", index - num_available))
2131+
Symbol::intern(&format!("'z{}", index - num_available))
21322132
}
21332133
}
21342134

@@ -2161,7 +2161,8 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
21612161

21622162
define_scoped_cx!(self);
21632163

2164-
let possible_names = vec![Symbol::intern("'t"), Symbol::intern("'s"), Symbol::intern("'r")];
2164+
let possible_names =
2165+
('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}"))).collect::<Vec<_>>();
21652166

21662167
let mut available_names = possible_names
21672168
.into_iter()

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ impl<'tcx> Region<'tcx> {
14621462
ty::ReEarlyBound(ebr) => Some(ebr.name),
14631463
ty::ReLateBound(_, br) => br.kind.get_name(),
14641464
ty::ReFree(fr) => fr.bound_region.get_name(),
1465-
ty::ReStatic => Some(Symbol::intern("static")),
1465+
ty::ReStatic => Some(kw::StaticLifetime),
14661466
ty::RePlaceholder(placeholder) => placeholder.name.get_name(),
14671467
_ => None,
14681468
};

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

+3-3
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<'r> fn(&'r T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
27+
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
2828
}
2929

3030
bb1: {
@@ -37,7 +37,7 @@
3737
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
3838
- // mir::Constant
3939
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
40-
- // + literal: Const { ty: for<'r> fn(&'r u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
40+
- // + literal: Const { ty: for<'a> fn(&'a u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
4141
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
4242
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
4343
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
@@ -53,7 +53,7 @@
5353
- _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
5454
- // mir::Constant
5555
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
56-
- // + literal: Const { ty: for<'r> fn(&'r [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
56+
- // + literal: Const { ty: for<'a> fn(&'a [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
5757
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5858
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5959
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16

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

+1-1
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<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
36+
// + literal: Const { ty: for<'a> fn(&'a [&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

+1-1
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<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
38+
// + literal: Const { ty: for<'a> fn(&'a [&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

+1-1
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<'r> fn(&'r str) -> &'r [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
23+
// + literal: Const { ty: for<'a> fn(&'a str) -> &'a [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
2424
}
2525

2626
bb1: {

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

+1-1
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<'r> fn(&'r 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: 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>) }
6060
}
6161

6262
bb3: {

src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
- // MIR for `nrvo` before DestinationPropagation
22
+ // MIR for `nrvo` after DestinationPropagation
33

4-
fn nrvo(_1: for<'r> fn(&'r mut [u8; 1024])) -> [u8; 1024] {
4+
fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
55
debug init => _1; // in scope 0 at $DIR/simple.rs:+0:9: +0:13
66
let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/simple.rs:+0:39: +0:49
77
let mut _2: [u8; 1024]; // in scope 0 at $DIR/simple.rs:+1:9: +1:16
88
let _3: (); // in scope 0 at $DIR/simple.rs:+2:5: +2:19
9-
let mut _4: for<'r> fn(&'r mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
9+
let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
1010
let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
1111
let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
1212
scope 1 {

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

+4-4
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<'r> fn(&'r Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
44+
// + literal: Const { ty: for<'a> fn(&'a 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<'r> fn(&'r Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
72+
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
7373
}
7474

7575
bb5: {
@@ -100,7 +100,7 @@
100100
_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<'r, 's, 't> fn(&'r mut Formatter<'s>, &'t T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
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>) }
104104
}
105105

106106
bb7: {
@@ -125,7 +125,7 @@
125125
_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<'r, 's, 't> fn(&'r mut Formatter<'s>, &'t T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
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>) }
129129
}
130130

131131
bb9: {

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

+1-1
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<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
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>) }
2121
}
2222

2323
bb1: {

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// mir::Constant
2929
// + span: $DIR/dyn-trait.rs:33:13: 33:21
3030
// + user_ty: UserType(0)
31-
// + literal: Const { ty: for<'r> fn(&'r T) -> &'r <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
31+
// + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
3232
}
3333

3434
bb1: {
@@ -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<'r> fn(&'r <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
49+
- // + literal: Const { ty: for<'a> fn(&'a <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<'r> fn(&'r 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: 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>) }
5252
}
5353

5454
bb2: {

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

+1-1
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<'r> fn(&'r dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
15+
// + literal: Const { ty: for<'a> fn(&'a 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

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
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<'r> fn(&'r (dyn Cache<V = <C as Cache>::V> + 'r)) {mk_cycle::<<C as Cache>::V>}, val: Value(<ZST>) }
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>) }
2727
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20
28-
+ // + literal: Const { ty: for<'r> fn(&'r 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: 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>) }
2929
}
3030

3131
bb1: {

src/test/mir-opt/inline/inline_generator.main.Inline.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
- _1 = <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
7171
- // mir::Constant
7272
- // + span: $DIR/inline-generator.rs:9:33: 9:39
73-
- // + literal: Const { ty: for<'r> fn(Pin<&'r mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
73+
- // + literal: Const { ty: for<'a> fn(Pin<&'a mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
7474
+ StorageLive(_7); // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
7575
+ _7 = const false; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
7676
+ StorageLive(_10); // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46

src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
fn bar() -> bool {
44
let mut _0: bool; // return place in scope 0 at $DIR/inline-retag.rs:+0:13: +0:17
5-
let _1: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
6-
let mut _2: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+2:5: +2:6
5+
let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
6+
let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+2:5: +2:6
77
let mut _3: &i32; // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
88
let _4: &i32; // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
99
let _5: i32; // in scope 0 at $DIR/inline-retag.rs:+2:8: +2:9
@@ -27,7 +27,7 @@ fn bar() -> bool {
2727
_1 = foo; // scope 0 at $DIR/inline-retag.rs:+1:13: +1:16
2828
// mir::Constant
2929
// + span: $DIR/inline-retag.rs:11:13: 11:16
30-
// + literal: Const { ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}, val: Value(<ZST>) }
30+
// + literal: Const { ty: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}, val: Value(<ZST>) }
3131
StorageLive(_2); // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
3232
_2 = _1; // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
3333
StorageLive(_3); // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9

src/test/mir-opt/inline/inline_shims.clone.Inline.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
1515
- // mir::Constant
1616
- // + span: $DIR/inline-shims.rs:6:7: 6:12
17-
- // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) }
17+
- // + literal: Const { ty: for<'a> fn(&'a fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) }
1818
- }
1919
-
2020
- bb1: {

src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn test(_1: &dyn X) -> u32 {
1111
_0 = <dyn X as X>::y(move _2) -> bb1; // scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
1212
// mir::Constant
1313
// + span: $DIR/inline-trait-method.rs:9:7: 9:8
14-
// + literal: Const { ty: for<'r> fn(&'r dyn X) -> u32 {<dyn X as X>::y}, val: Value(<ZST>) }
14+
// + literal: Const { ty: for<'a> fn(&'a dyn X) -> u32 {<dyn X as X>::y}, val: Value(<ZST>) }
1515
}
1616

1717
bb1: {

src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn test2(_1: &dyn X) -> bool {
2121
_0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
2222
// mir::Constant
2323
// + span: $DIR/inline-trait-method_2.rs:10:7: 10:8
24-
// + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {<dyn X as X>::y}, val: Value(<ZST>) }
24+
// + literal: Const { ty: for<'a> fn(&'a dyn X) -> bool {<dyn X as X>::y}, val: Value(<ZST>) }
2525
}
2626

2727
bb1: {

src/test/mir-opt/inline/issue_78442.bar.Inline.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
- _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
3030
- // mir::Constant
3131
- // + span: $DIR/issue-78442.rs:11:5: 11:15
32-
- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
32+
- // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
3333
+ _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL
3434
}
3535

0 commit comments

Comments
 (0)