/// 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.
}
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());