diff options
| author | Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> | 2025-07-13 02:03:56 +0900 |
|---|---|---|
| committer | Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> | 2025-07-13 02:03:56 +0900 |
| commit | da6c099dcc2c60b636db102b4085f517c3ed4ecc (patch) | |
| tree | 7af3befcc79403c978a53225b4511ec0ea4b5b06 /src/tools/rust-analyzer/crates/syntax | |
| parent | c4e8c34682653f8fa4829a576df74493c856cd9b (diff) | |
remove `remove_default`
Diffstat (limited to 'src/tools/rust-analyzer/crates/syntax')
| -rw-r--r-- | src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs index e60243f2c91..e902516471d 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs @@ -406,42 +406,6 @@ impl ast::WhereClause { } } -impl ast::TypeParam { - pub fn remove_default(&self) { - if let Some((eq, last)) = self - .syntax() - .children_with_tokens() - .find(|it| it.kind() == T![=]) - .zip(self.syntax().last_child_or_token()) - { - ted::remove_all(eq..=last); - - // remove any trailing ws - if let Some(last) = self.syntax().last_token().filter(|it| it.kind() == WHITESPACE) { - last.detach(); - } - } - } -} - -impl ast::ConstParam { - pub fn remove_default(&self) { - if let Some((eq, last)) = self - .syntax() - .children_with_tokens() - .find(|it| it.kind() == T![=]) - .zip(self.syntax().last_child_or_token()) - { - ted::remove_all(eq..=last); - - // remove any trailing ws - if let Some(last) = self.syntax().last_token().filter(|it| it.kind() == WHITESPACE) { - last.detach(); - } - } - } -} - pub trait Removable: AstNode { fn remove(&self); } |
