mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Rename
This commit is contained in:
parent
81359af733
commit
af53d5f4b0
8 changed files with 12 additions and 15 deletions
|
@ -136,14 +136,14 @@ impl ast::UseTreeList {
|
|||
}
|
||||
|
||||
impl ast::Impl {
|
||||
pub fn target_type(&self) -> Option<ast::Type> {
|
||||
pub fn self_ty(&self) -> Option<ast::Type> {
|
||||
match self.target() {
|
||||
(Some(t), None) | (_, Some(t)) => Some(t),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn target_trait(&self) -> Option<ast::Type> {
|
||||
pub fn trait_(&self) -> Option<ast::Type> {
|
||||
match self.target() {
|
||||
(Some(t), Some(_)) => Some(t),
|
||||
_ => None,
|
||||
|
|
|
@ -208,7 +208,7 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec<SyntaxError>) {
|
|||
Some(it) => it,
|
||||
None => return,
|
||||
};
|
||||
if impl_def.target_trait().is_some() {
|
||||
if impl_def.trait_().is_some() {
|
||||
errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue