Clarify field name

This commit is contained in:
Jonas Schievink 2021-05-19 20:23:26 +02:00
parent ea8555b155
commit c0d93bc4d6
4 changed files with 6 additions and 6 deletions

View file

@ -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 },

View file

@ -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,
};

View file

@ -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 },

View file

@ -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<tt::Subtree>,
arg_or_expansion: Arc<tt::Subtree>,
included_file: Option<FileId>,
}