Inline parameters in inline_call if possible
This commit is contained in:
@@ -431,6 +431,12 @@ impl ast::RecordExprFieldList {
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::BlockExpr {
|
||||
pub fn push_front(&self, statement: ast::Stmt) {
|
||||
ted::insert(Position::after(self.l_curly_token().unwrap()), statement.syntax());
|
||||
}
|
||||
}
|
||||
|
||||
fn normalize_ws_between_braces(node: &SyntaxNode) -> Option<()> {
|
||||
let l = node
|
||||
.children_with_tokens()
|
||||
|
||||
@@ -641,6 +641,15 @@ impl ast::SlicePat {
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::IdentPat {
|
||||
pub fn is_simple_ident(&self) -> bool {
|
||||
self.at_token().is_none()
|
||||
&& self.mut_token().is_none()
|
||||
&& self.ref_token().is_none()
|
||||
&& self.pat().is_none()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum SelfParamKind {
|
||||
/// self
|
||||
|
||||
Reference in New Issue
Block a user