diff options
Diffstat (limited to 'compiler/rustc_passes/src/check_attr.rs')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index dca6f2959d2..e0739c342df 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -954,8 +954,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { tcx.dcx().emit_err(errors::DocAliasBadLocation { span, attr_str, location }); return; } - let item_name = self.tcx.hir_name(hir_id); - if item_name == doc_alias { + if self.tcx.hir_opt_name(hir_id) == Some(doc_alias) { tcx.dcx().emit_err(errors::DocAliasNotAnAlias { span, attr_str }); return; } |
