aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 19:23:52 +0100
committerAleksey Kladov <[email protected]>2020-07-31 19:23:52 +0100
commitaf53d5f4b081ad50d8fe08fc1e107aa6025b2491 (patch)
tree342258c6744a6ec8189b9910f2b3bb7efd73f06b /crates/ra_syntax/src
parent81359af733f7b13e0bd2196191f2ab294e1b57aa (diff)
Rename
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs4
-rw-r--r--crates/ra_syntax/src/validation.rs2
2 files changed, 3 insertions, 3 deletions
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}