aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers
diff options
context:
space:
mode:
authorBrandon <[email protected]>2021-04-08 05:43:38 +0100
committerBrandon <[email protected]>2021-04-08 05:43:38 +0100
commit1ccfd0cedae91065d2484920484dfdaee116d590 (patch)
tree10bfe2d98237a615ec05e0de533b38b3b9825db5 /crates/ide_assists/src/handlers
parent72781085bba92756d11f9fcc3d879b60108d230f (diff)
Fix faulty assertion when extracting function with macro call
Diffstat (limited to 'crates/ide_assists/src/handlers')
-rw-r--r--crates/ide_assists/src/handlers/extract_function.rs3
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