rustc: move the contents of ty::item_path to ty::print.
This commit is contained in:
parent
e0c75ff40d
commit
9f8aaa04e0
10 changed files with 573 additions and 580 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue