From fec79d355234aed1599674262ab5adfbde700fe7 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Wed, 17 Apr 2019 18:19:59 +0200 Subject: [PATCH] Print generic args in function calls in MIR --- src/librustc/ty/print/pretty.rs | 4 ++-- src/test/mir-opt/box_expr.rs | 2 +- src/test/mir-opt/inline-trait-method.rs | 2 +- src/test/mir-opt/inline-trait-method_2.rs | 2 +- src/test/mir-opt/issue-49232.rs | 2 +- src/test/mir-opt/unusual-item-types.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs index 6514017a3e7..6a5494e9d9a 100644 --- a/src/librustc/ty/print/pretty.rs +++ b/src/librustc/ty/print/pretty.rs @@ -1539,8 +1539,8 @@ define_print_and_forward_display! { &'tcx ty::Const<'tcx> { let u8 = cx.tcx().types.u8; - if let ty::FnDef(did, _) = self.ty.sty { - p!(write("{}", cx.tcx().def_path_str(did))); + if let ty::FnDef(did, substs) = self.ty.sty { + p!(print_value_path(did, substs)); return Ok(cx); } if let ConstValue::Unevaluated(did, substs) = self.val { diff --git a/src/test/mir-opt/box_expr.rs b/src/test/mir-opt/box_expr.rs index ee6adfefe3e..9f55d849644 100644 --- a/src/test/mir-opt/box_expr.rs +++ b/src/test/mir-opt/box_expr.rs @@ -52,7 +52,7 @@ impl Drop for S { // StorageDead(_2); // StorageLive(_4); // _4 = move _1; -// _3 = const std::mem::drop(move _4) -> [return: bb5, unwind: bb7]; +// _3 = const std::mem::drop::>(move _4) -> [return: bb5, unwind: bb7]; // } // // bb5: { diff --git a/src/test/mir-opt/inline-trait-method.rs b/src/test/mir-opt/inline-trait-method.rs index 0f79f43ee2d..a2c5fb920cd 100644 --- a/src/test/mir-opt/inline-trait-method.rs +++ b/src/test/mir-opt/inline-trait-method.rs @@ -25,7 +25,7 @@ impl X for () { // ... // bb0: { // ... -// _0 = const X::y(move _2) -> bb1; +// _0 = const ::y(move _2) -> bb1; // } // ... // END rustc.test.Inline.after.mir diff --git a/src/test/mir-opt/inline-trait-method_2.rs b/src/test/mir-opt/inline-trait-method_2.rs index 8f9f2535aa5..4ad4311113a 100644 --- a/src/test/mir-opt/inline-trait-method_2.rs +++ b/src/test/mir-opt/inline-trait-method_2.rs @@ -30,7 +30,7 @@ fn main() { // ... // bb0: { // ... -// _0 = const X::y(move _2) -> bb1; +// _0 = const ::y(move _2) -> bb1; // } // ... // END rustc.test2.Inline.after.mir diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/issue-49232.rs index bf22f00b505..447f3a07a6a 100644 --- a/src/test/mir-opt/issue-49232.rs +++ b/src/test/mir-opt/issue-49232.rs @@ -93,7 +93,7 @@ fn main() { // StorageDead(_3); // StorageLive(_6); // _6 = &_2; -// _5 = const std::mem::drop(move _6) -> [return: bb19, unwind: bb4]; +// _5 = const std::mem::drop::<&i32>(move _6) -> [return: bb19, unwind: bb4]; // } // bb19: { // StorageDead(_6); diff --git a/src/test/mir-opt/unusual-item-types.rs b/src/test/mir-opt/unusual-item-types.rs index 606503151c9..93f17d976e6 100644 --- a/src/test/mir-opt/unusual-item-types.rs +++ b/src/test/mir-opt/unusual-item-types.rs @@ -68,7 +68,7 @@ fn main() { // } // bb7: { // _2 = &mut (*_1); -// _3 = const std::ops::Drop::drop(move _2) -> [return: bb6, unwind: bb5]; +// _3 = const as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // } // END rustc.ptr-real_drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir