Skip to content

Commit 35ce2ab

Browse files
committed
Use proper const printing in rustdoc
1 parent 7212685 commit 35ce2ab

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustdoc/clean/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -3145,10 +3145,7 @@ impl<'tcx> Clean<Constant> for ty::Const<'tcx> {
31453145
fn clean(&self, cx: &DocContext<'_>) -> Constant {
31463146
Constant {
31473147
type_: self.ty.clean(cx),
3148-
expr: match self.val {
3149-
ConstValue::Param(ty::ParamConst { name, .. }) => format!("{}", name),
3150-
e => format!("{:?}", e), // FIXME generic consts with expressions
3151-
},
3148+
expr: format!("{}", self),
31523149
}
31533150
}
31543151
}

0 commit comments

Comments
 (0)