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 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
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,
}