Also use mir::Offset
for pointer add
This commit is contained in:
parent
8bcfc0e597
commit
e1da77c76d
11 changed files with 117 additions and 77 deletions
|
@ -215,7 +215,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
|
|||
|
||||
sym::type_name => (1, Vec::new(), tcx.mk_static_str()),
|
||||
sym::type_id => (1, Vec::new(), tcx.types.u64),
|
||||
sym::offset | sym::arith_offset => (
|
||||
sym::offset => (2, vec![param(0), param(1)], param(0)),
|
||||
sym::arith_offset => (
|
||||
1,
|
||||
vec![
|
||||
tcx.mk_ptr(ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue