mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Merge #4110
4110: minor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
4f0cb81a2e
@ -30,10 +30,6 @@ impl SyntaxNodePtr {
|
|||||||
.unwrap_or_else(|| panic!("can't resolve local ptr to SyntaxNode: {:?}", self))
|
.unwrap_or_else(|| panic!("can't resolve local ptr to SyntaxNode: {:?}", self))
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub fn range(&self) -> TextRange {
|
|
||||||
// self.range
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn cast<N: AstNode>(self) -> Option<AstPtr<N>> {
|
pub fn cast<N: AstNode>(self) -> Option<AstPtr<N>> {
|
||||||
if !N::can_cast(self.kind) {
|
if !N::can_cast(self.kind) {
|
||||||
return None;
|
return None;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user