diff options
Diffstat (limited to 'crates/ide_assists/src')
-rw-r--r-- | crates/ide_assists/src/handlers/extract_function.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs index 5fdc8bf38..d84f51eae 100644 --- a/crates/ide_assists/src/handlers/extract_function.rs +++ b/crates/ide_assists/src/handlers/extract_function.rs | |||
@@ -787,7 +787,7 @@ impl HasTokenAtOffset for SyntaxNode { | |||
787 | } | 787 | } |
788 | } | 788 | } |
789 | 789 | ||
790 | /// find relevant `ast::PathExpr` for reference | 790 | /// find relevant `ast::Expr` for reference |
791 | /// | 791 | /// |
792 | /// # Preconditions | 792 | /// # Preconditions |
793 | /// | 793 | /// |
@@ -804,7 +804,6 @@ fn path_element_of_reference( | |||
804 | stdx::never!(false, "cannot find path parent of variable usage: {:?}", token); | 804 | stdx::never!(false, "cannot find path parent of variable usage: {:?}", token); |
805 | None | 805 | None |
806 | })?; | 806 | })?; |
807 | stdx::always!(matches!(path, ast::Expr::PathExpr(_))); | ||
808 | Some(path) | 807 | Some(path) |
809 | } | 808 | } |
810 | 809 | ||