diff options
| author | ouz-a <ouz.agz@gmail.com> | 2023-10-02 11:22:48 +0300 |
|---|---|---|
| committer | ouz-a <ouz.agz@gmail.com> | 2023-10-02 23:39:45 +0300 |
| commit | 5d753abb300eebfb6492dc2b47bd32052a322b71 (patch) | |
| tree | 2209d4af7e8fb773bbe592d11e2428a1c3f52bb6 /compiler/rustc_borrowck/src | |
| parent | 6f0c5ee2d4c9ced0fa9d0e698b6a136cfdc51949 (diff) | |
| download | rust-5d753abb300eebfb6492dc2b47bd32052a322b71.tar.gz rust-5d753abb300eebfb6492dc2b47bd32052a322b71.zip | |
have better explanation for `relate_types`
Diffstat (limited to 'compiler/rustc_borrowck/src')
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index ed36ca6a29b..e7b1a489f5d 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -716,11 +716,9 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> { } PlaceTy::from_ty(fty) } - ProjectionElem::Subtype(_) => PlaceTy::from_ty(Ty::new_error_with_message( - tcx, - self.last_span, - "ProjectionElem::Subtype shouldn't exist in borrowck", - )), + ProjectionElem::Subtype(_) => { + bug!("ProjectionElem::Subtype shouldn't exist in borrowck") + } ProjectionElem::OpaqueCast(ty) => { let ty = self.sanitize_type(place, ty); let ty = self.cx.normalize(ty, location); |
