diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-04-29 23:32:40 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-04-30 22:33:04 -0700 |
| commit | 5292d48b85482bd3edc430e1933f5bc51eafbff4 (patch) | |
| tree | 397a91daa526a8e5333624e347162ecd707b398c /compiler/rustc_hir_analysis/src | |
| parent | ca3f742ff6fe12b6bb247546189d44718f679799 (diff) | |
| download | rust-5292d48b85482bd3edc430e1933f5bc51eafbff4.tar.gz rust-5292d48b85482bd3edc430e1933f5bc51eafbff4.zip | |
Codegen fewer instructions in `mem::replace`
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/intrinsic.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index d505d8b8e0b..6a10b50aa16 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -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( |
