We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 106070b commit e13d352Copy full SHA for e13d352
src/librustc_mir/build/scope.rs
@@ -622,8 +622,8 @@ fn build_free<'tcx>(tcx: &ty::ctxt<'tcx>,
622
unit_temp: Lvalue<'tcx>,
623
data: &FreeData<'tcx>,
624
target: BasicBlock) -> Terminator<'tcx> {
625
- let free_func = tcx.lang_items.box_free_fn()
626
- .expect("box_free language item is missing");
+ let free_func = tcx.lang_items.require(lang_items::BoxFreeFnLangItem)
+ .unwrap_or_else(|e| tcx.sess.fatal(&e));
627
let substs = tcx.mk_substs(Substs::new(
628
VecPerParamSpace::new(vec![], vec![], vec![data.item_ty]),
629
VecPerParamSpace::new(vec![], vec![], vec![])
0 commit comments