This commit is contained in:
Aleksey Kladov
2020-07-31 20:23:52 +02:00
parent 81359af733
commit af53d5f4b0
8 changed files with 12 additions and 15 deletions

View File

@@ -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,