From 1ccfd0cedae91065d2484920484dfdaee116d590 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 7 Apr 2021 21:43:38 -0700 Subject: Fix faulty assertion when extracting function with macro call --- crates/ide_assists/src/handlers/extract_function.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates') 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 { } } -/// find relevant `ast::PathExpr` for reference +/// find relevant `ast::Expr` for reference /// /// # Preconditions /// @@ -804,7 +804,6 @@ fn path_element_of_reference( stdx::never!(false, "cannot find path parent of variable usage: {:?}", token); None })?; - stdx::always!(matches!(path, ast::Expr::PathExpr(_))); Some(path) } -- cgit v1.2.3