1
Fork 0

rustc: move the contents of ty::item_path to ty::print.

This commit is contained in:
Eduard-Mihai Burtescu 2018-12-19 13:25:31 +02:00
parent e0c75ff40d
commit 9f8aaa04e0
10 changed files with 573 additions and 580 deletions

View file

@ -4225,12 +4225,11 @@ pub fn path_to_def(tcx: &TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefId> {
pub fn get_path_for_type<F>(tcx: TyCtxt<'_, '_, '_>, def_id: DefId, def_ctor: F) -> hir::Path
where F: Fn(DefId) -> Def {
use rustc::ty::item_path::ItemPathPrinter;
use rustc::ty::print::PrintCx;
use rustc::ty::print::{PrintCx, Printer};
struct AbsolutePathPrinter;
impl ItemPathPrinter for AbsolutePathPrinter {
impl Printer for AbsolutePathPrinter {
type Path = Vec<String>;
fn path_crate(self: &mut PrintCx<'_, '_, '_, Self>, cnum: CrateNum) -> Self::Path {