]> git.lizzy.rs Git - rust.git/commitdiff
rustc_trait_selection changes
authorPietro Albini <pietro.albini@ferrous-systems.com>
Tue, 5 Apr 2022 13:09:41 +0000 (15:09 +0200)
committerPietro Albini <pietro@pietroalbini.org>
Tue, 5 Apr 2022 21:18:41 +0000 (23:18 +0200)
compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
compiler/rustc_trait_selection/src/traits/select/confirmation.rs

index cf472813e9e3217c873ab060c0b7091bf58f2ae5..06f5824099237b2c36b9e3f9717205c5d4d4e0ce 100644 (file)
@@ -307,17 +307,6 @@ pub(super) fn assemble_candidates<'o>(
                 self.assemble_builtin_bound_candidates(sized_conditions, &mut candidates);
             } else if lang_items.unsize_trait() == Some(def_id) {
                 self.assemble_candidates_for_unsizing(obligation, &mut candidates);
-            } else if lang_items.drop_trait() == Some(def_id)
-                && obligation.predicate.is_const_if_const()
-            {
-                // holds to make it easier to transition
-                // FIXME(fee1-dead): add a note for selection error of `~const Drop`
-                // when beta is bumped
-                // FIXME: remove this when beta is bumped
-                #[cfg(bootstrap)]
-                {}
-
-                candidates.vec.push(SelectionCandidate::ConstDestructCandidate(None))
             } else if lang_items.destruct_trait() == Some(def_id) {
                 self.assemble_const_destruct_candidates(obligation, &mut candidates);
             } else {
index 18a37759543174d5c558960e646f3b3c0b6159b9..b97ab39d991fee4dd05b23d2f0f9d46bfe254379 100644 (file)
@@ -1106,13 +1106,6 @@ fn confirm_const_destruct_candidate(
         }
 
         let drop_trait = self.tcx().require_lang_item(LangItem::Drop, None);
-        // FIXME: remove if statement below when beta is bumped
-        #[cfg(bootstrap)]
-        {}
-
-        if obligation.predicate.skip_binder().def_id() == drop_trait {
-            return Ok(ImplSourceConstDestructData { nested: vec![] });
-        }
 
         let tcx = self.tcx();
         let self_ty = self.infcx.shallow_resolve(obligation.self_ty());