1
Fork 0

hir: Create hir::ConstArgKind enum

This will allow lowering const params to a dedicated enum variant, rather
than to an `AnonConst` that is later examined during `ty` lowering.
This commit is contained in:
Noah Lev 2024-06-02 23:23:28 -07:00
parent 71f8aed510
commit 11b144aa98
13 changed files with 102 additions and 40 deletions

View file

@ -78,7 +78,7 @@ fn gen_args(cx: &LateContext<'_>, segment: &PathSegment<'_>) -> String {
.tcx
.sess
.source_map()
.span_to_snippet(c.value.span)
.span_to_snippet(c.span())
.unwrap_or_else(|_| "_".into()),
GenericArg::Infer(_) => String::from("_"),
})