mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix faulty assertion when extracting function with macro call
This commit is contained in:
parent
72781085bb
commit
1ccfd0ceda
1 changed files with 1 additions and 2 deletions
|
@ -787,7 +787,7 @@ impl HasTokenAtOffset for SyntaxNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// find relevant `ast::PathExpr` for reference
|
/// find relevant `ast::Expr` for reference
|
||||||
///
|
///
|
||||||
/// # Preconditions
|
/// # Preconditions
|
||||||
///
|
///
|
||||||
|
@ -804,7 +804,6 @@ fn path_element_of_reference(
|
||||||
stdx::never!(false, "cannot find path parent of variable usage: {:?}", token);
|
stdx::never!(false, "cannot find path parent of variable usage: {:?}", token);
|
||||||
None
|
None
|
||||||
})?;
|
})?;
|
||||||
stdx::always!(matches!(path, ast::Expr::PathExpr(_)));
|
|
||||||
Some(path)
|
Some(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue