diff options
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/db.rs | 6 | ||||
-rw-r--r-- | crates/hir_expand/src/eager.rs | 2 | ||||
-rw-r--r-- | crates/hir_expand/src/hygiene.rs | 2 | ||||
-rw-r--r-- | crates/hir_expand/src/lib.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index dcc038bcd..b591130ca 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs | |||
@@ -143,7 +143,7 @@ pub(crate) fn macro_def( | |||
143 | Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default()))) | 143 | Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default()))) |
144 | } | 144 | } |
145 | MacroDefKind::BuiltInEager(_) => None, | 145 | MacroDefKind::BuiltInEager(_) => None, |
146 | MacroDefKind::CustomDerive(expander) => { | 146 | MacroDefKind::ProcMacro(expander) => { |
147 | Some(Arc::new((TokenExpander::ProcMacro(expander), mbe::TokenMap::default()))) | 147 | Some(Arc::new((TokenExpander::ProcMacro(expander), mbe::TokenMap::default()))) |
148 | } | 148 | } |
149 | } | 149 | } |
@@ -223,7 +223,7 @@ fn macro_expand_with_arg( | |||
223 | let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, ¯o_arg.0); | 223 | let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, ¯o_arg.0); |
224 | // Set a hard limit for the expanded tt | 224 | // Set a hard limit for the expanded tt |
225 | let count = tt.count(); | 225 | let count = tt.count(); |
226 | if count > 65536 { | 226 | if count > 262144 { |
227 | return (None, Some(format!("Total tokens count exceed limit : count = {}", count))); | 227 | return (None, Some(format!("Total tokens count exceed limit : count = {}", count))); |
228 | } | 228 | } |
229 | (Some(Arc::new(tt)), err.map(|e| format!("{:?}", e))) | 229 | (Some(Arc::new(tt)), err.map(|e| format!("{:?}", e))) |
@@ -249,7 +249,7 @@ pub(crate) fn expand_proc_macro( | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | let expander = match loc.def.kind { | 251 | let expander = match loc.def.kind { |
252 | MacroDefKind::CustomDerive(expander) => expander, | 252 | MacroDefKind::ProcMacro(expander) => expander, |
253 | _ => unreachable!(), | 253 | _ => unreachable!(), |
254 | }; | 254 | }; |
255 | 255 | ||
diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index 10c45646f..2f37d7189 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs | |||
@@ -129,7 +129,7 @@ fn eager_macro_recur( | |||
129 | MacroDefKind::Declarative | 129 | MacroDefKind::Declarative |
130 | | MacroDefKind::BuiltIn(_) | 130 | | MacroDefKind::BuiltIn(_) |
131 | | MacroDefKind::BuiltInDerive(_) | 131 | | MacroDefKind::BuiltInDerive(_) |
132 | | MacroDefKind::CustomDerive(_) => { | 132 | | MacroDefKind::ProcMacro(_) => { |
133 | let expanded = lazy_expand(db, &def, curr.with_value(child.clone()), krate)?; | 133 | let expanded = lazy_expand(db, &def, curr.with_value(child.clone()), krate)?; |
134 | // replace macro inside | 134 | // replace macro inside |
135 | eager_macro_recur(db, expanded, krate, macro_resolver)? | 135 | eager_macro_recur(db, expanded, krate, macro_resolver)? |
diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index 845e9cbc1..d383b968d 100644 --- a/crates/hir_expand/src/hygiene.rs +++ b/crates/hir_expand/src/hygiene.rs | |||
@@ -33,7 +33,7 @@ impl Hygiene { | |||
33 | MacroDefKind::BuiltIn(_) => (None, false), | 33 | MacroDefKind::BuiltIn(_) => (None, false), |
34 | MacroDefKind::BuiltInDerive(_) => (None, false), | 34 | MacroDefKind::BuiltInDerive(_) => (None, false), |
35 | MacroDefKind::BuiltInEager(_) => (None, false), | 35 | MacroDefKind::BuiltInEager(_) => (None, false), |
36 | MacroDefKind::CustomDerive(_) => (None, false), | 36 | MacroDefKind::ProcMacro(_) => (None, false), |
37 | } | 37 | } |
38 | } | 38 | } |
39 | MacroCallId::EagerMacro(_id) => (None, false), | 39 | MacroCallId::EagerMacro(_id) => (None, false), |
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 2be15e841..17f1178ed 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -246,7 +246,7 @@ pub enum MacroDefKind { | |||
246 | // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander | 246 | // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander |
247 | BuiltInDerive(BuiltinDeriveExpander), | 247 | BuiltInDerive(BuiltinDeriveExpander), |
248 | BuiltInEager(EagerExpander), | 248 | BuiltInEager(EagerExpander), |
249 | CustomDerive(ProcMacroExpander), | 249 | ProcMacro(ProcMacroExpander), |
250 | } | 250 | } |
251 | 251 | ||
252 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 252 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |