From 1ccfd0cedae91065d2484920484dfdaee116d590 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 7 Apr 2021 21:43:38 -0700 Subject: [PATCH] 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(-) diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs index 5fdc8bf387b..d84f51eaec4 100644 --- a/crates/ide_assists/src/handlers/extract_function.rs +++ b/crates/ide_assists/src/handlers/extract_function.rs @@ -787,7 +787,7 @@ fn token_at_offset(&self, offset: TextSize) -> TokenAtOffset { } } -/// 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) }