Move ConstArg::span
to AnonConst::span
This commit is contained in:
parent
4dc46f7f17
commit
4a19711b25
4 changed files with 12 additions and 9 deletions
|
@ -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<_>>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue