about summary refs log tree commit diff
diff options
context:
space:
mode:
authorjumbatm <30644300+jumbatm@users.noreply.github.com>2020-12-23 00:34:26 +1000
committerjumbatm <30644300+jumbatm@users.noreply.github.com>2021-01-12 03:31:01 +1000
commit4b740acea270464758a3c81ea4341d858064ee28 (patch)
treee120cfedd803f9762abe4d841e604a30c9beb2f2
parent7a46a4f2197c6ff1026d2bd81480165ad0b43bbc (diff)
downloadrust-4b740acea270464758a3c81ea4341d858064ee28.tar.gz
rust-4b740acea270464758a3c81ea4341d858064ee28.zip
Add FIXME note about storing &'tcx str
-rw-r--r--compiler/rustc_lint/src/builtin.rs5
1 files changed, 5 insertions, 0 deletions
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<String, HirId>,
 }