check if impl_self is Some

This commit is contained in:
Takayuki Maeda 2022-10-20 14:10:52 +09:00
parent 0b2716415f
commit 9a9e2fe15f

View File

@ -1932,7 +1932,7 @@ fn is_self_ty(&self, ty: &Ty) -> bool {
if let Some(Res::SelfTyParam { .. } | Res::SelfTyAlias { .. }) = path_res {
return true;
}
path_res == self.impl_self
self.impl_self.is_some() && path_res == self.impl_self
}
_ => false,
}