From 4b740acea270464758a3c81ea4341d858064ee28 Mon Sep 17 00:00:00 2001 From: jumbatm <30644300+jumbatm@users.noreply.github.com> Date: Wed, 23 Dec 2020 00:34:26 +1000 Subject: [PATCH] Add FIXME note about storing &'tcx str --- compiler/rustc_lint/src/builtin.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 131d783ce4e..20e476b38cc 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2596,6 +2596,11 @@ declare_lint! { } pub struct ClashingExternDeclarations { + /// Map of function symbol name to the first-seen hir id for that symbol name.. If seen_decls + /// contains an entry for key K, it means a symbol with name K has been seen by this lint and + /// the symbol should be reported as a clashing declaration. + // FIXME: Technically, we could just store a &'tcx str here without issue; however, the + // `impl_lint_pass` macro doesn't currently support lints parametric over a lifetime. seen_decls: FxHashMap, }