about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-10-19 11:17:46 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-10-19 11:17:46 +0900
commit0b2716415f1bd26e80887c2d8459fd436fc8e9b3 (patch)
treec5ae601fbd5cbed0d4c6061f7e3bbd0393d5f487 /compiler/rustc_resolve/src
parentee1c3b385b6673b6ef37d80dfabe048e993c2ae2 (diff)
downloadrust-0b2716415f1bd26e80887c2d8459fd436fc8e9b3.tar.gz
rust-0b2716415f1bd26e80887c2d8459fd436fc8e9b3.zip
fix `SelfVisitor::is_self_ty` ICE
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index cc877e2fd30..5b99cd1e264 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -1928,11 +1928,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
                 match ty.kind {
                     TyKind::ImplicitSelf => true,
                     TyKind::Path(None, _) => {
-                        let path_res = self.r.partial_res_map[&ty.id].expect_full_res();
-                        if let Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } = path_res {
+                        let path_res = self.r.partial_res_map[&ty.id].full_res();
+                        if let Some(Res::SelfTyParam { .. } | Res::SelfTyAlias { .. }) = path_res {
                             return true;
                         }
-                        Some(path_res) == self.impl_self
+                        path_res == self.impl_self
                     }
                     _ => false,
                 }