summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/ty/print/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_middle/src/ty/print/mod.rs')
-rw-r--r--compiler/rustc_middle/src/ty/print/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/mod.rs b/compiler/rustc_middle/src/ty/print/mod.rs
index d947d9604..64e7480e6 100644
--- a/compiler/rustc_middle/src/ty/print/mod.rs
+++ b/compiler/rustc_middle/src/ty/print/mod.rs
@@ -169,8 +169,11 @@ pub trait Printer<'tcx>: Sized {
self.path_append(
|cx: Self| {
if trait_qualify_parent {
- let trait_ref =
- cx.tcx().mk_trait_ref(parent_def_id, parent_substs.iter().copied());
+ let trait_ref = ty::TraitRef::new(
+ cx.tcx(),
+ parent_def_id,
+ parent_substs.iter().copied(),
+ );
cx.path_qualified(trait_ref.self_ty(), Some(trait_ref))
} else {
cx.print_def_path(parent_def_id, parent_substs)
@@ -327,6 +330,6 @@ pub fn describe_as_module(def_id: LocalDefId, tcx: TyCtxt<'_>) -> String {
if def_id.is_top_level_module() {
"top-level module".to_string()
} else {
- format!("module `{}`", tcx.def_path_str(def_id.to_def_id()))
+ format!("module `{}`", tcx.def_path_str(def_id))
}
}