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

@ -452,7 +452,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
match ga {
hir::GenericArg::Lifetime(lt) => self.visit_lifetime(lt),
hir::GenericArg::Type(ty) => self.visit_ty(ty),
hir::GenericArg::Const(ct) => self.visit_anon_const(&ct.value),
hir::GenericArg::Const(ct) => self.visit_const_arg(ct),
hir::GenericArg::Infer(inf) => self.visit_infer(inf),
}
}