diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-03-27 14:11:44 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-02 07:30:11 +0000 |
| commit | ca32447c0ccd38367ad1ff98c784f17f21d0e80e (patch) | |
| tree | 748f943e4cb104f7594193b1d6fc1f6c8a42fce0 /compiler/rustc_hir_analysis/src/check/always_applicable.rs | |
| parent | 51184c70c897619f6a2883538f8a85292306a0c8 (diff) | |
| download | rust-ca32447c0ccd38367ad1ff98c784f17f21d0e80e.tar.gz rust-ca32447c0ccd38367ad1ff98c784f17f21d0e80e.zip | |
Only look at trait impls in the current crate when looking for `Drop` impls
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/always_applicable.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/always_applicable.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/always_applicable.rs b/compiler/rustc_hir_analysis/src/check/always_applicable.rs index 8a841a11556..7a6a84c6392 100644 --- a/compiler/rustc_hir_analysis/src/check/always_applicable.rs +++ b/compiler/rustc_hir_analysis/src/check/always_applicable.rs @@ -36,10 +36,8 @@ use crate::hir::def_id::{DefId, LocalDefId}; /// cannot do `struct S<T>; impl<T:Clone> Drop for S<T> { ... }`). pub(crate) fn check_drop_impl( tcx: TyCtxt<'_>, - drop_impl_did: DefId, + drop_impl_did: LocalDefId, ) -> Result<(), ErrorGuaranteed> { - let drop_impl_did = drop_impl_did.expect_local(); - match tcx.impl_polarity(drop_impl_did) { ty::ImplPolarity::Positive => {} ty::ImplPolarity::Negative => { |
