From c0d93bc4d60d71fb6fec6e6c7305401f96ac18e8 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 19 May 2021 20:23:26 +0200 Subject: Clarify field name --- crates/hir_expand/src/builtin_macro.rs | 4 ++-- crates/hir_expand/src/db.rs | 2 +- crates/hir_expand/src/eager.rs | 4 ++-- crates/hir_expand/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates') diff --git a/crates/hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs index 09ac16700..94d7aecb6 100644 --- a/crates/hir_expand/src/builtin_macro.rs +++ b/crates/hir_expand/src/builtin_macro.rs @@ -625,7 +625,7 @@ mod tests { def, krate, eager: Some(EagerCallInfo { - expansion: Arc::new(parsed_args.clone()), + arg_or_expansion: Arc::new(parsed_args.clone()), included_file: None, }), kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr }, @@ -636,7 +636,7 @@ mod tests { def, krate, eager: Some(EagerCallInfo { - expansion: Arc::new(expanded.subtree), + arg_or_expansion: Arc::new(expanded.subtree), included_file: expanded.included_file, }), kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment }, diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index 7a82400a8..5c769c1bf 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs @@ -329,7 +329,7 @@ fn macro_expand_with_arg( ); } else { return ExpandResult { - value: Some(eager.expansion.clone()), + value: Some(eager.arg_or_expansion.clone()), // FIXME: There could be errors here! err: None, }; diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index 5e30ab930..e165b9c5f 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs @@ -122,7 +122,7 @@ pub fn expand_eager_macro( def, krate, eager: Some(EagerCallInfo { - expansion: Arc::new(parsed_args.clone()), + arg_or_expansion: Arc::new(parsed_args.clone()), included_file: None, }), kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr }, @@ -149,7 +149,7 @@ pub fn expand_eager_macro( def, krate, eager: Some(EagerCallInfo { - expansion: Arc::new(expanded.subtree), + arg_or_expansion: Arc::new(expanded.subtree), included_file: expanded.included_file, }), kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment }, diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index edd5f9db2..b93c0c345 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -231,7 +231,7 @@ pub enum MacroDefKind { #[derive(Debug, Clone, PartialEq, Eq, Hash)] struct EagerCallInfo { /// NOTE: This can be *either* the expansion result, *or* the argument to the eager macro! - expansion: Arc, + arg_or_expansion: Arc, included_file: Option, } -- cgit v1.2.3