mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Complete derive helper attributes
Only their names, anything can go inside.
This commit is contained in:
parent
e6276c8b64
commit
890d155ffe
5 changed files with 111 additions and 4 deletions
|
@ -7,8 +7,8 @@ mod tests;
|
|||
use std::{iter, ops::ControlFlow};
|
||||
|
||||
use hir::{
|
||||
HasAttrs, Local, ModuleSource, Name, PathResolution, ScopeDef, Semantics, SemanticsScope, Type,
|
||||
TypeInfo,
|
||||
HasAttrs, Local, ModuleSource, Name, PathResolution, ScopeDef, Semantics, SemanticsScope,
|
||||
Symbol, Type, TypeInfo,
|
||||
};
|
||||
use ide_db::{
|
||||
base_db::SourceDatabase, famous_defs::FamousDefs, helpers::is_editable_crate, FilePosition,
|
||||
|
@ -133,6 +133,7 @@ pub(crate) type ExistingDerives = FxHashSet<hir::Macro>;
|
|||
pub(crate) struct AttrCtx {
|
||||
pub(crate) kind: AttrKind,
|
||||
pub(crate) annotated_item_kind: Option<SyntaxKind>,
|
||||
pub(crate) derive_helpers: Vec<(Symbol, Symbol)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue