Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot
Some hir cleanups It seemed odd to not put `AnonConst` in the arena, compared with the other types that we did put into an arena. This way we can also give it a `Span` without growing a lot of other HIR data structures because of the extra field. r? compiler
This commit is contained in:
commit
09cd00fea4
16 changed files with 89 additions and 87 deletions
|
@ -74,9 +74,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