X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Fselect%2Fconfirmation.rs;h=771a3072af5d94475aa29de59fbecdeb82a7f852;hb=7907385999b4a83d37ed31d334f3ed9ca02983a1;hp=18a37759543174d5c558960e646f3b3c0b6159b9;hpb=b5e763ace3c6e9e5d23cfe201a7aecfa5f8bd050;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index 18a37759543..771a3072af5 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -712,9 +712,9 @@ fn confirm_closure_candidate( /// and we desugared it so that the type of the expression is /// `Closure`, and `Closure` expects `i32` as argument. Then it /// is "as if" the compiler generated this impl: - /// - /// impl Fn(i32) for Closure { ... } - /// + /// ```ignore (illustrative) + /// impl Fn(i32) for Closure { ... } + /// ``` /// Now imagine our obligation is `Closure: Fn(usize)`. So far /// we have matched the self type `Closure`. At this point we'll /// compare the `i32` to `usize` and generate an error. @@ -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());