diff options
author | Aleksey Kladov <[email protected]> | 2019-11-24 10:57:45 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-24 10:57:45 +0000 |
commit | cfffea6dc81f802e32d0312b958f20fa1b1d8425 (patch) | |
tree | 3e11bf65441d7e770ea0fa8fb652c7b9b4cadc0c /crates/ra_hir_def/src/nameres.rs | |
parent | f0e0a40a6106e979843f97001bb3db59ceb29557 (diff) |
Push poison_macros down
Diffstat (limited to 'crates/ra_hir_def/src/nameres.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 68a0451a2..f6cf59c5f 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -66,7 +66,7 @@ use ra_arena::Arena; | |||
66 | use ra_db::{CrateId, Edition, FileId}; | 66 | use ra_db::{CrateId, Edition, FileId}; |
67 | use ra_prof::profile; | 67 | use ra_prof::profile; |
68 | use ra_syntax::ast; | 68 | use ra_syntax::ast; |
69 | use rustc_hash::{FxHashMap, FxHashSet}; | 69 | use rustc_hash::FxHashMap; |
70 | 70 | ||
71 | use crate::{ | 71 | use crate::{ |
72 | builtin_type::BuiltinType, | 72 | builtin_type::BuiltinType, |
@@ -90,18 +90,6 @@ pub struct CrateDefMap { | |||
90 | root: LocalModuleId, | 90 | root: LocalModuleId, |
91 | modules: Arena<LocalModuleId, ModuleData>, | 91 | modules: Arena<LocalModuleId, ModuleData>, |
92 | 92 | ||
93 | /// Some macros are not well-behavior, which leads to infinite loop | ||
94 | /// e.g. macro_rules! foo { ($ty:ty) => { foo!($ty); } } | ||
95 | /// We mark it down and skip it in collector | ||
96 | /// | ||
97 | /// FIXME: | ||
98 | /// Right now it only handle a poison macro in a single crate, | ||
99 | /// such that if other crate try to call that macro, | ||
100 | /// the whole process will do again until it became poisoned in that crate. | ||
101 | /// We should handle this macro set globally | ||
102 | /// However, do we want to put it as a global variable? | ||
103 | poison_macros: FxHashSet<MacroDefId>, | ||
104 | |||
105 | diagnostics: Vec<DefDiagnostic>, | 93 | diagnostics: Vec<DefDiagnostic>, |
106 | } | 94 | } |
107 | 95 | ||
@@ -234,7 +222,6 @@ impl CrateDefMap { | |||
234 | prelude: None, | 222 | prelude: None, |
235 | root, | 223 | root, |
236 | modules, | 224 | modules, |
237 | poison_macros: FxHashSet::default(), | ||
238 | diagnostics: Vec::new(), | 225 | diagnostics: Vec::new(), |
239 | } | 226 | } |
240 | }; | 227 | }; |