summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/prefixes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src/prefixes.rs')
-rw-r--r--compiler/rustc_borrowck/src/prefixes.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_borrowck/src/prefixes.rs b/compiler/rustc_borrowck/src/prefixes.rs
index 6f281349863..e9c9709bd1f 100644
--- a/compiler/rustc_borrowck/src/prefixes.rs
+++ b/compiler/rustc_borrowck/src/prefixes.rs
@@ -89,6 +89,9 @@ impl<'cx, 'tcx> Iterator for Prefixes<'cx, 'tcx> {
                             cursor = cursor_base;
                             continue 'cursor;
                         }
+                        ProjectionElem::Subtype(..) => {
+                            panic!("Subtype projection is not allowed before borrow check")
+                        }
                         ProjectionElem::Deref => {
                             // (handled below)
                         }