Skip to content

Commit 9a9e2fe

Browse files
committed
check if impl_self is Some
1 parent 0b27164 commit 9a9e2fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_resolve/src/late.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
19321932
if let Some(Res::SelfTyParam { .. } | Res::SelfTyAlias { .. }) = path_res {
19331933
return true;
19341934
}
1935-
path_res == self.impl_self
1935+
self.impl_self.is_some() && path_res == self.impl_self
19361936
}
19371937
_ => false,
19381938
}

0 commit comments

Comments
 (0)