mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-18 09:30:31 +00:00
Implement const block inference
This commit is contained in:
parent
0a780c0ab3
commit
a142beaf01
5 changed files with 25 additions and 6 deletions
|
@ -358,6 +358,7 @@ pub enum Effect {
|
|||
Async(SyntaxToken),
|
||||
Unsafe(SyntaxToken),
|
||||
Try(SyntaxToken),
|
||||
Const(SyntaxToken),
|
||||
// Very much not an effect, but we stuff it into this node anyway
|
||||
Label(ast::Label),
|
||||
}
|
||||
|
@ -373,6 +374,9 @@ impl ast::EffectExpr {
|
|||
if let Some(token) = self.try_token() {
|
||||
return Effect::Try(token);
|
||||
}
|
||||
if let Some(token) = self.const_token() {
|
||||
return Effect::Const(token);
|
||||
}
|
||||
if let Some(label) = self.label() {
|
||||
return Effect::Label(label);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue