Move ConstArg::span to AnonConst::span

This commit is contained in:
Oli Scherer 2024-04-26 13:05:00 +00:00
parent 4dc46f7f17
commit 4a19711b25
4 changed files with 12 additions and 9 deletions

View file

@ -73,9 +73,12 @@ fn gen_args(cx: &LateContext<'_>, segment: &PathSegment<'_>) -> String {
GenericArg::Type(ty) => {
cx.tcx.sess.source_map().span_to_snippet(ty.span).unwrap_or_else(|_| "_".into())
}
GenericArg::Const(c) => {
cx.tcx.sess.source_map().span_to_snippet(c.span).unwrap_or_else(|_| "_".into())
}
GenericArg::Const(c) => cx
.tcx
.sess
.source_map()
.span_to_snippet(c.value.span)
.unwrap_or_else(|_| "_".into()),
GenericArg::Infer(_) => String::from("_"),
})
.collect::<Vec<_>>();