Show ::{{constructor}}
in std::any::type_name().
This commit is contained in:
parent
716394d658
commit
32ee368c86
1 changed files with 1 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
use rustc_hir::def_id::CrateNum;
|
use rustc_hir::def_id::CrateNum;
|
||||||
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
|
use rustc_hir::definitions::DisambiguatedDefPathData;
|
||||||
use rustc_middle::mir::interpret::Allocation;
|
use rustc_middle::mir::interpret::Allocation;
|
||||||
use rustc_middle::ty::{
|
use rustc_middle::ty::{
|
||||||
self,
|
self,
|
||||||
|
@ -127,11 +127,6 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
|
||||||
) -> Result<Self::Path, Self::Error> {
|
) -> Result<Self::Path, Self::Error> {
|
||||||
self = print_prefix(self)?;
|
self = print_prefix(self)?;
|
||||||
|
|
||||||
// Skip `::{{constructor}}` on tuple/unit structs.
|
|
||||||
if disambiguated_data.data == DefPathData::Ctor {
|
|
||||||
return Ok(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
write!(self.path, "::{}", disambiguated_data.data).unwrap();
|
write!(self.path, "::{}", disambiguated_data.data).unwrap();
|
||||||
|
|
||||||
Ok(self)
|
Ok(self)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue