mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Merge #2179
2179: Use HirDatabase to compute `is_deprecated` r=matklad a=martskins This PR fixes #2167 by introducing `attributes_query` and adding `fn attrs(&self, def: crate::AttrDef) -> Option<Arc<[Attr]>>;` to the `DefDatabase` trait. I'm a little concerned about the two spots in `attributes_query` where code is repeated, but I couldn't figure out a way to avoid that, so.. I welcome suggestions 😄 Co-authored-by: Martin Asquino <martin.asquino@gmail.com>
This commit is contained in:
commit
14e19c0df1
5 changed files with 111 additions and 14 deletions
|
@ -61,6 +61,7 @@ use crate::{ids::MacroFileKind, resolve::Resolver};
|
|||
pub use crate::{
|
||||
adt::VariantDef,
|
||||
code_model::{
|
||||
attrs::{AttrDef, Attrs},
|
||||
docs::{DocDef, Docs, Documentation},
|
||||
src::{HasBodySource, HasSource},
|
||||
Adt, AssocItem, Const, ConstData, Container, Crate, CrateDependency, DefWithBody, Enum,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue