1
Fork 0

Codegen fewer instructions in mem::replace

This commit is contained in:
Scott McMurray 2023-04-29 23:32:40 -07:00
parent ca3f742ff6
commit 5292d48b85
13 changed files with 154 additions and 78 deletions

View file

@ -381,6 +381,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
sym::unlikely => (0, vec![tcx.types.bool], tcx.types.bool),
sym::read_via_copy => (1, vec![tcx.mk_imm_ptr(param(0))], param(0)),
sym::write_via_move => (1, vec![tcx.mk_mut_ptr(param(0)), param(0)], tcx.mk_unit()),
sym::discriminant_value => {
let assoc_items = tcx.associated_item_def_ids(