mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-18 00:00:03 +00:00
Merge #536
536: Introduce variable semicolon block expr r=matklad a=yerke Fix for https://github.com/rust-analyzer/rust-analyzer/issues/504 Feels a bit hacky... Co-authored-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
commit
d75a0368f5
2 changed files with 30 additions and 1 deletions
|
@ -296,6 +296,15 @@ impl IfExpr {
|
|||
}
|
||||
}
|
||||
|
||||
impl ExprStmt {
|
||||
pub fn has_semi(&self) -> bool {
|
||||
match self.syntax().last_child() {
|
||||
None => false,
|
||||
Some(node) => node.kind() == SEMI,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum PathSegmentKind<'a> {
|
||||
Name(&'a NameRef),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue