mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Added const bodies and static body to the ast
and added inference the inference test reduce code duplication
This commit is contained in:
parent
7f3bf7cc73
commit
88e22e9d70
10 changed files with 180 additions and 91 deletions
|
@ -629,7 +629,11 @@ impl ast::TypeParamsOwner for ConstDef {}
|
|||
impl ast::AttrsOwner for ConstDef {}
|
||||
impl ast::DocCommentsOwner for ConstDef {}
|
||||
impl ast::TypeAscriptionOwner for ConstDef {}
|
||||
impl ConstDef {}
|
||||
impl ConstDef {
|
||||
pub fn body(&self) -> Option<&Expr> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueExpr
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
@ -657,7 +661,6 @@ impl ToOwned for ContinueExpr {
|
|||
}
|
||||
|
||||
|
||||
|
||||
impl ContinueExpr {}
|
||||
|
||||
// DynTraitType
|
||||
|
@ -3808,7 +3811,11 @@ impl ast::TypeParamsOwner for StaticDef {}
|
|||
impl ast::AttrsOwner for StaticDef {}
|
||||
impl ast::DocCommentsOwner for StaticDef {}
|
||||
impl ast::TypeAscriptionOwner for StaticDef {}
|
||||
impl StaticDef {}
|
||||
impl StaticDef {
|
||||
pub fn body(&self) -> Option<&Expr> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// Stmt
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue