Lower ast::Ident to hir::Path when lowering RangePats

This commit is contained in:
Ali Bektas 2025-01-19 23:58:49 +01:00
parent 94b00c210c
commit 8956b1e1ba
9 changed files with 139 additions and 58 deletions

View file

@ -347,7 +347,7 @@ impl SourceToDefCtx<'_, '_> {
&mut self,
src: InFile<&ast::IdentPat>,
) -> Option<(DefWithBodyId, BindingId)> {
let container = self.find_pat_or_label_container(src.syntax_ref())?;
let container = dbg!(self.find_pat_or_label_container(src.syntax_ref()))?;
let (body, source_map) = self.db.body_with_source_map(container);
let src = src.cloned().map(ast::Pat::from);
let pat_id = source_map.node_pat(src.as_ref())?;