name resolution for guard patterns

This commit is contained in:
dianne
2025-05-07 06:59:30 -07:00
parent 30a0ac66db
commit f0b8ec1d71
6 changed files with 255 additions and 30 deletions

View File

@@ -611,7 +611,7 @@ impl Pat {
/// Walk top-down and call `it` in each place where a pattern occurs
/// starting with the root pattern `walk` is called on. If `it` returns
/// false then we will descend no further but siblings will be processed.
pub fn walk(&self, it: &mut impl FnMut(&Pat) -> bool) {
pub fn walk<'ast>(&'ast self, it: &mut impl FnMut(&'ast Pat) -> bool) {
if !it(self) {
return;
}