Merge pull request #18877 from ChayimFriedman2/crazy-hang

fix: Fix a bug with missing binding in MBE
This commit is contained in:
Laurențiu Nicola 2025-01-08 06:53:07 +00:00 committed by GitHub
commit 238ccb628b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2732 additions and 1 deletions

View file

@ -1,5 +1,7 @@
#![allow(clippy::print_stderr)]
mod overly_long_real_world_cases;
use ide_db::{
assists::AssistResolveStrategy, base_db::SourceDatabase, LineIndexDatabase, RootDatabase,
};

File diff suppressed because it is too large Load diff

View file

@ -38,7 +38,10 @@ impl<'t> Bindings<'t> {
nesting_state.hit = true;
b = match b {
Binding::Fragment(_) => break,
Binding::Missing(_) => break,
Binding::Missing(_) => {
nesting_state.at_end = true;
break;
}
Binding::Nested(bs) => bs.get(nesting_state.idx).ok_or_else(|| {
nesting_state.at_end = true;
binding_err!("could not find nested binding `{name}`")