Collect attributes during HIR lowering.
This commit is contained in:
parent
d50ca3cbee
commit
1fb257b3b4
9 changed files with 126 additions and 87 deletions
|
@ -61,6 +61,15 @@ rustc_queries! {
|
|||
desc { |tcx| "HIR owner items in `{}`", tcx.def_path_str(key.to_def_id()) }
|
||||
}
|
||||
|
||||
/// Gives access to the HIR attributes inside the HIR owner `key`.
|
||||
///
|
||||
/// This can be conveniently accessed by methods on `tcx.hir()`.
|
||||
/// Avoid calling this query directly.
|
||||
query hir_attrs(key: LocalDefId) -> &'tcx IndexVec<ItemLocalId, &'tcx [ast::Attribute]> {
|
||||
eval_always
|
||||
desc { |tcx| "HIR owner attributes in `{}`", tcx.def_path_str(key.to_def_id()) }
|
||||
}
|
||||
|
||||
/// Computes the `DefId` of the corresponding const parameter in case the `key` is a
|
||||
/// const argument and returns `None` otherwise.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue