Implement #[define_opaque]
attribute for functions.
This commit is contained in:
parent
2c6a12ec44
commit
cb4751d4b8
653 changed files with 2911 additions and 2580 deletions
|
@ -1307,13 +1307,18 @@ impl Attribute {
|
|||
#[derive(Debug)]
|
||||
pub struct AttributeMap<'tcx> {
|
||||
pub map: SortedMap<ItemLocalId, &'tcx [Attribute]>,
|
||||
/// Preprocessed `#[define_opaque]` attribute.
|
||||
pub define_opaque: Option<&'tcx [LocalDefId]>,
|
||||
// Only present when the crate hash is needed.
|
||||
pub opt_hash: Option<Fingerprint>,
|
||||
}
|
||||
|
||||
impl<'tcx> AttributeMap<'tcx> {
|
||||
pub const EMPTY: &'static AttributeMap<'static> =
|
||||
&AttributeMap { map: SortedMap::new(), opt_hash: Some(Fingerprint::ZERO) };
|
||||
pub const EMPTY: &'static AttributeMap<'static> = &AttributeMap {
|
||||
map: SortedMap::new(),
|
||||
opt_hash: Some(Fingerprint::ZERO),
|
||||
define_opaque: None,
|
||||
};
|
||||
|
||||
#[inline]
|
||||
pub fn get(&self, id: ItemLocalId) -> &'tcx [Attribute] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue