Skip to content

Commit 1ccfd0c

Browse files
author
Brandon
committed
Fix faulty assertion when extracting function with macro call
1 parent 7278108 commit 1ccfd0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ide_assists/src/handlers/extract_function.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ impl HasTokenAtOffset for SyntaxNode {
787787
}
788788
}
789789

790-
/// find relevant `ast::PathExpr` for reference
790+
/// find relevant `ast::Expr` for reference
791791
///
792792
/// # Preconditions
793793
///
@@ -804,7 +804,6 @@ fn path_element_of_reference(
804804
stdx::never!(false, "cannot find path parent of variable usage: {:?}", token);
805805
None
806806
})?;
807-
stdx::always!(matches!(path, ast::Expr::PathExpr(_)));
808807
Some(path)
809808
}
810809

0 commit comments

Comments
 (0)