aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs1
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs4
-rw-r--r--crates/ra_syntax/src/validation.rs2
3 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 231a0f727..01aefb60d 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -267,7 +267,6 @@ impl Impl {
267 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } 267 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
268 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) } 268 pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
269 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } 269 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
270 pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
271 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) } 270 pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
272 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } 271 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
273 pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } 272 pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index 4b4a72375..af5a93d1d 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -136,14 +136,14 @@ impl ast::UseTreeList {
136} 136}
137 137
138impl ast::Impl { 138impl ast::Impl {
139 pub fn target_type(&self) -> Option<ast::Type> { 139 pub fn self_ty(&self) -> Option<ast::Type> {
140 match self.target() { 140 match self.target() {
141 (Some(t), None) | (_, Some(t)) => Some(t), 141 (Some(t), None) | (_, Some(t)) => Some(t),
142 _ => None, 142 _ => None,
143 } 143 }
144 } 144 }
145 145
146 pub fn target_trait(&self) -> Option<ast::Type> { 146 pub fn trait_(&self) -> Option<ast::Type> {
147 match self.target() { 147 match self.target() {
148 (Some(t), Some(_)) => Some(t), 148 (Some(t), Some(_)) => Some(t),
149 _ => None, 149 _ => None,
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index 0325ab0b4..2dddaf09a 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -208,7 +208,7 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec<SyntaxError>) {
208 Some(it) => it, 208 Some(it) => it,
209 None => return, 209 None => return,
210 }; 210 };
211 if impl_def.target_trait().is_some() { 211 if impl_def.trait_().is_some() {
212 errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range())); 212 errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range()));
213 } 213 }
214} 214}