From 9a9e2fe15fd0a730e929db88fcf73b0cb3a99ddc Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Thu, 20 Oct 2022 14:10:52 +0900 Subject: check if impl_self is `Some` --- compiler/rustc_resolve/src/late.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_resolve/src') diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 5b99cd1e264..c6607eff90d 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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, } -- cgit 1.4.1-3-g733a5