mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-25 19:35:06 +00:00
Merge pull request #18877 from ChayimFriedman2/crazy-hang
fix: Fix a bug with missing binding in MBE
This commit is contained in:
commit
238ccb628b
3 changed files with 2732 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
#![allow(clippy::print_stderr)]
|
||||
|
||||
mod overly_long_real_world_cases;
|
||||
|
||||
use ide_db::{
|
||||
assists::AssistResolveStrategy, base_db::SourceDatabase, LineIndexDatabase, RootDatabase,
|
||||
};
|
||||
|
|
2726
crates/ide-diagnostics/src/tests/overly_long_real_world_cases.rs
Normal file
2726
crates/ide-diagnostics/src/tests/overly_long_real_world_cases.rs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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}`")
|
||||
|
|
Loading…
Reference in a new issue