Add accountable-refcell as optional build time feature

This commit is contained in:
Kunal Mohan 2020-01-07 13:27:19 +05:30
parent bd636b0e6c
commit 02c1612cb0
No known key found for this signature in database
GPG key ID: 2B475A4524237BAC
29 changed files with 69 additions and 44 deletions

View file

@ -125,6 +125,8 @@ fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function
match_def_path(cx, did.did, &[sym::core, sym.cell, sym.RefMut]) ||
match_def_path(cx, did.did, &[sym::core, sym.slice, sym.Iter]) ||
match_def_path(cx, did.did, &[sym::core, sym.slice, sym.IterMut]) ||
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.Ref]) ||
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.RefMut]) ||
match_def_path(
cx,
did.did,
@ -175,6 +177,7 @@ fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function
ty::Ref(..) => false, // don't recurse down &ptrs
ty::RawPtr(..) => false, // don't recurse down *ptrs
ty::FnDef(..) | ty::FnPtr(_) => false,
_ => true,
}
});
@ -412,6 +415,7 @@ symbols! {
rc
Rc
cell
accountable_refcell
Ref
RefMut
slice