Skip to content

Commit fec79d3

Browse files
committed
Print generic args in function calls in MIR
1 parent 0528954 commit fec79d3

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/librustc/ty/print/pretty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,8 +1539,8 @@ define_print_and_forward_display! {
15391539

15401540
&'tcx ty::Const<'tcx> {
15411541
let u8 = cx.tcx().types.u8;
1542-
if let ty::FnDef(did, _) = self.ty.sty {
1543-
p!(write("{}", cx.tcx().def_path_str(did)));
1542+
if let ty::FnDef(did, substs) = self.ty.sty {
1543+
p!(print_value_path(did, substs));
15441544
return Ok(cx);
15451545
}
15461546
if let ConstValue::Unevaluated(did, substs) = self.val {

src/test/mir-opt/box_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Drop for S {
5252
// StorageDead(_2);
5353
// StorageLive(_4);
5454
// _4 = move _1;
55-
// _3 = const std::mem::drop(move _4) -> [return: bb5, unwind: bb7];
55+
// _3 = const std::mem::drop::<std::boxed::Box<S>>(move _4) -> [return: bb5, unwind: bb7];
5656
// }
5757
//
5858
// bb5: {

src/test/mir-opt/inline-trait-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl X for () {
2525
// ...
2626
// bb0: {
2727
// ...
28-
// _0 = const X::y(move _2) -> bb1;
28+
// _0 = const <dyn X as X>::y(move _2) -> bb1;
2929
// }
3030
// ...
3131
// END rustc.test.Inline.after.mir

src/test/mir-opt/inline-trait-method_2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
// ...
3131
// bb0: {
3232
// ...
33-
// _0 = const X::y(move _2) -> bb1;
33+
// _0 = const <dyn X as X>::y(move _2) -> bb1;
3434
// }
3535
// ...
3636
// END rustc.test2.Inline.after.mir

src/test/mir-opt/issue-49232.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn main() {
9393
// StorageDead(_3);
9494
// StorageLive(_6);
9595
// _6 = &_2;
96-
// _5 = const std::mem::drop(move _6) -> [return: bb19, unwind: bb4];
96+
// _5 = const std::mem::drop::<&i32>(move _6) -> [return: bb19, unwind: bb4];
9797
// }
9898
// bb19: {
9999
// StorageDead(_6);

src/test/mir-opt/unusual-item-types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn main() {
6868
// }
6969
// bb7: {
7070
// _2 = &mut (*_1);
71-
// _3 = const std::ops::Drop::drop(move _2) -> [return: bb6, unwind: bb5];
71+
// _3 = const <std::vec::Vec<i32> as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5];
7272
// }
7373
// END rustc.ptr-real_drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir
7474

0 commit comments

Comments
 (0)