Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/nameres/diagnostics.rs')
| -rw-r--r-- | crates/hir-def/src/nameres/diagnostics.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/crates/hir-def/src/nameres/diagnostics.rs b/crates/hir-def/src/nameres/diagnostics.rs index c495a07449..6a07c56aee 100644 --- a/crates/hir-def/src/nameres/diagnostics.rs +++ b/crates/hir-def/src/nameres/diagnostics.rs @@ -17,8 +17,8 @@ pub enum DefDiagnosticKind { UnconfiguredCode { ast_id: ErasedAstId, cfg: CfgExpr, opts: CfgOptions }, UnresolvedMacroCall { ast: MacroCallKind, path: ModPath }, UnimplementedBuiltinMacro { ast: AstId<ast::Macro> }, - InvalidDeriveTarget { ast: AstId<ast::Item>, id: usize }, - MalformedDerive { ast: AstId<ast::Adt>, id: usize }, + InvalidDeriveTarget { ast: AstId<ast::Item>, id: AttrId }, + MalformedDerive { ast: AstId<ast::Adt>, id: AttrId }, MacroDefError { ast: AstId<ast::Macro>, message: String }, MacroError { ast: AstId<ast::Item>, path: ModPath, err: ExpandErrorKind }, } @@ -119,10 +119,7 @@ impl DefDiagnostic { ast: AstId<ast::Item>, id: AttrId, ) -> Self { - Self { - in_module: container, - kind: DefDiagnosticKind::InvalidDeriveTarget { ast, id: id.ast_index() }, - } + Self { in_module: container, kind: DefDiagnosticKind::InvalidDeriveTarget { ast, id } } } pub(super) fn malformed_derive( @@ -130,9 +127,6 @@ impl DefDiagnostic { ast: AstId<ast::Adt>, id: AttrId, ) -> Self { - Self { - in_module: container, - kind: DefDiagnosticKind::MalformedDerive { ast, id: id.ast_index() }, - } + Self { in_module: container, kind: DefDiagnosticKind::MalformedDerive { ast, id } } } } |