Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_assists/src/handlers/promote_local_to_const.rs')
| -rw-r--r-- | crates/ide_assists/src/handlers/promote_local_to_const.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/promote_local_to_const.rs b/crates/ide_assists/src/handlers/promote_local_to_const.rs index 58cee8eafb..65c14406f9 100644 --- a/crates/ide_assists/src/handlers/promote_local_to_const.rs +++ b/crates/ide_assists/src/handlers/promote_local_to_const.rs @@ -53,7 +53,7 @@ pub(crate) fn promote_local_to_const(acc: &mut Assists, ctx: &AssistContext) -> } let let_stmt = pat.syntax().parent().and_then(ast::LetStmt::cast)?; - let module = ctx.sema.scope(pat.syntax()).module()?; + let module = ctx.sema.scope(pat.syntax())?.module(); let local = ctx.sema.to_def(&pat)?; let ty = ctx.sema.type_of_pat(&pat.into())?.original; |