Eagerly convert some ctors to use their specialized ctors
This commit is contained in:
parent
24db8eaefd
commit
81e7e80990
12 changed files with 31 additions and 86 deletions
|
@ -240,15 +240,9 @@ pub fn check_intrinsic_type(
|
|||
sym::prefetch_read_data
|
||||
| sym::prefetch_write_data
|
||||
| sym::prefetch_read_instruction
|
||||
| sym::prefetch_write_instruction => (
|
||||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
tcx.types.i32,
|
||||
],
|
||||
Ty::new_unit(tcx),
|
||||
),
|
||||
| sym::prefetch_write_instruction => {
|
||||
(1, 0, vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.i32], Ty::new_unit(tcx))
|
||||
}
|
||||
sym::needs_drop => (1, 0, vec![], tcx.types.bool),
|
||||
|
||||
sym::type_name => (1, 0, vec![], Ty::new_static_str(tcx)),
|
||||
|
@ -257,28 +251,22 @@ pub fn check_intrinsic_type(
|
|||
sym::arith_offset => (
|
||||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
tcx.types.isize,
|
||||
],
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.isize],
|
||||
Ty::new_imm_ptr(tcx, param(0)),
|
||||
),
|
||||
sym::ptr_mask => (
|
||||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
tcx.types.usize,
|
||||
],
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize],
|
||||
Ty::new_imm_ptr(tcx, param(0)),
|
||||
),
|
||||
|
||||
sym::copy | sym::copy_nonoverlapping => (
|
||||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }),
|
||||
Ty::new_imm_ptr(tcx, param(0)),
|
||||
Ty::new_mut_ptr(tcx, param(0)),
|
||||
tcx.types.usize,
|
||||
],
|
||||
Ty::new_unit(tcx),
|
||||
|
@ -287,8 +275,8 @@ pub fn check_intrinsic_type(
|
|||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }),
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
Ty::new_mut_ptr(tcx, param(0)),
|
||||
Ty::new_imm_ptr(tcx, param(0)),
|
||||
tcx.types.usize,
|
||||
],
|
||||
Ty::new_unit(tcx),
|
||||
|
@ -300,11 +288,7 @@ pub fn check_intrinsic_type(
|
|||
sym::write_bytes | sym::volatile_set_memory => (
|
||||
1,
|
||||
0,
|
||||
vec![
|
||||
Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }),
|
||||
tcx.types.u8,
|
||||
tcx.types.usize,
|
||||
],
|
||||
vec![Ty::new_mut_ptr(tcx, param(0)), tcx.types.u8, tcx.types.usize],
|
||||
Ty::new_unit(tcx),
|
||||
),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue