Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/drop.rs')
| -rw-r--r-- | crates/hir-ty/src/drop.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-ty/src/drop.rs b/crates/hir-ty/src/drop.rs index 726b862fe1..e1fbc85960 100644 --- a/crates/hir-ty/src/drop.rs +++ b/crates/hir-ty/src/drop.rs @@ -6,7 +6,6 @@ use hir_def::{ }; use rustc_hash::FxHashSet; use rustc_type_ir::inherent::{AdtDef, GenericArgs as _, IntoKind}; -use stdx::never; use crate::{ consteval, @@ -177,9 +176,7 @@ fn has_drop_glue_impl<'db>( } } TyKind::Infer(..) => unreachable!("inference vars shouldn't exist out of inference"), - TyKind::Pat(..) | TyKind::UnsafeBinder(..) => { - never!("we do not handle pattern and unsafe binder types"); - DropGlue::None - } + TyKind::Pat(ty, _) => has_drop_glue_impl(infcx, ty, env, visited), + TyKind::UnsafeBinder(ty) => has_drop_glue_impl(infcx, ty.skip_binder(), env, visited), } } |