Skip to content

Commit 32ee368

Browse files
committed
Show ::{{constructor}} in std::any::type_name().
1 parent 716394d commit 32ee368

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/rustc_mir/src/interpret/intrinsics/type_name.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_hir::def_id::CrateNum;
2-
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
2+
use rustc_hir::definitions::DisambiguatedDefPathData;
33
use rustc_middle::mir::interpret::Allocation;
44
use rustc_middle::ty::{
55
self,
@@ -127,11 +127,6 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
127127
) -> Result<Self::Path, Self::Error> {
128128
self = print_prefix(self)?;
129129

130-
// Skip `::{{constructor}}` on tuple/unit structs.
131-
if disambiguated_data.data == DefPathData::Ctor {
132-
return Ok(self);
133-
}
134-
135130
write!(self.path, "::{}", disambiguated_data.data).unwrap();
136131

137132
Ok(self)

0 commit comments

Comments
 (0)