Synthesize calls to box_free language item
This gets rid of Drop(Free, _) MIR construct by synthesizing a call to language item which takes care of dropping instead.
This commit is contained in:
parent
7b9d6d3bc8
commit
432460a6fc
20 changed files with 127 additions and 69 deletions
|
|
@ -1649,7 +1649,7 @@ fn encode_crate_deps(rbml_w: &mut Encoder, cstore: &cstore::CStore) {
|
|||
fn encode_lang_items(ecx: &EncodeContext, rbml_w: &mut Encoder) {
|
||||
rbml_w.start_tag(tag_lang_items);
|
||||
|
||||
for (i, &opt_def_id) in ecx.tcx.lang_items.items() {
|
||||
for (i, &opt_def_id) in ecx.tcx.lang_items.items().iter().enumerate() {
|
||||
if let Some(def_id) = opt_def_id {
|
||||
if def_id.is_local() {
|
||||
rbml_w.start_tag(tag_lang_items_item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue