make retagging work even with 'unstable' places
This commit is contained in:
parent
c5351ad4dc
commit
9397ea1368
15 changed files with 135 additions and 128 deletions
|
@ -177,16 +177,6 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
|
|||
if ty.is_some() {
|
||||
// The first argument (index 0), but add 1 for the return value.
|
||||
let dropee_ptr = Place::from(Local::new(1 + 0));
|
||||
if tcx.sess.opts.unstable_opts.mir_emit_retag {
|
||||
// Function arguments should be retagged, and we make this one raw.
|
||||
body.basic_blocks_mut()[START_BLOCK].statements.insert(
|
||||
0,
|
||||
Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Retag(RetagKind::Raw, Box::new(dropee_ptr)),
|
||||
},
|
||||
);
|
||||
}
|
||||
let patch = {
|
||||
let param_env = tcx.param_env_reveal_all_normalized(def_id);
|
||||
let mut elaborator =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue