fold ScopeWithSyntax into SourceAnalyzer

This commit is contained in:
Aleksey Kladov 2019-04-13 10:49:01 +03:00
parent 30481808fb
commit f4a94e74bc
7 changed files with 159 additions and 193 deletions

View file

@ -27,7 +27,7 @@ pub(crate) fn inline_local_varialbe(mut ctx: AssistCtx<impl HirDatabase>) -> Opt
let_stmt.syntax().range()
};
let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, bind_pat.syntax(), None);
let refs = analyzer.find_all_refs(bind_pat)?;
let refs = analyzer.find_all_refs(bind_pat);
let mut wrap_in_parens = vec![true; refs.len()];