internal: Enforce Resolver to always have a module scope

This commit is contained in:
Lukas Wirth 2022-03-31 11:12:08 +02:00
parent ef92453dfe
commit 75689f2ad8
71 changed files with 360 additions and 398 deletions

View file

@ -635,7 +635,7 @@ impl Analysis {
self.with_db(|db| {
let rule: ide_ssr::SsrRule = query.parse()?;
let mut match_finder =
ide_ssr::MatchFinder::in_context(db, resolve_context, selections);
ide_ssr::MatchFinder::in_context(db, resolve_context, selections)?;
match_finder.add_rule(rule)?;
let edits = if parse_only { Default::default() } else { match_finder.edits() };
Ok(SourceChange::from(edits))