Auto merge of #29666 - Manishearth:rollup, r=Manishearth
- Successful merges: #29617, #29622, #29656, #29659, #29660 - Failed merges:
This commit is contained in:
commit
bb9b5f5ede
10 changed files with 68 additions and 21 deletions
|
|
@ -344,6 +344,11 @@ pub fn is_const_fn(cstore: &cstore::CStore, did: DefId) -> bool {
|
|||
decoder::is_const_fn(&*cdata, did.index)
|
||||
}
|
||||
|
||||
pub fn is_static(cstore: &cstore::CStore, did: DefId) -> bool {
|
||||
let cdata = cstore.get_crate_data(did.krate);
|
||||
decoder::is_static(&*cdata, did.index)
|
||||
}
|
||||
|
||||
pub fn is_impl(cstore: &cstore::CStore, did: DefId) -> bool {
|
||||
let cdata = cstore.get_crate_data(did.krate);
|
||||
decoder::is_impl(&*cdata, did.index)
|
||||
|
|
|
|||
|
|
@ -1425,6 +1425,14 @@ pub fn is_const_fn(cdata: Cmd, id: DefIndex) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_static(cdata: Cmd, id: DefIndex) -> bool {
|
||||
let item_doc = cdata.lookup_item(id);
|
||||
match item_family(item_doc) {
|
||||
ImmStatic | MutStatic => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_impl(cdata: Cmd, id: DefIndex) -> bool {
|
||||
let item_doc = cdata.lookup_item(id);
|
||||
match item_family(item_doc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue