mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Clarify field name
This commit is contained in:
parent
ea8555b155
commit
c0d93bc4d6
4 changed files with 6 additions and 6 deletions
|
@ -625,7 +625,7 @@ mod tests {
|
||||||
def,
|
def,
|
||||||
krate,
|
krate,
|
||||||
eager: Some(EagerCallInfo {
|
eager: Some(EagerCallInfo {
|
||||||
expansion: Arc::new(parsed_args.clone()),
|
arg_or_expansion: Arc::new(parsed_args.clone()),
|
||||||
included_file: None,
|
included_file: None,
|
||||||
}),
|
}),
|
||||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr },
|
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr },
|
||||||
|
@ -636,7 +636,7 @@ mod tests {
|
||||||
def,
|
def,
|
||||||
krate,
|
krate,
|
||||||
eager: Some(EagerCallInfo {
|
eager: Some(EagerCallInfo {
|
||||||
expansion: Arc::new(expanded.subtree),
|
arg_or_expansion: Arc::new(expanded.subtree),
|
||||||
included_file: expanded.included_file,
|
included_file: expanded.included_file,
|
||||||
}),
|
}),
|
||||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment },
|
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment },
|
||||||
|
|
|
@ -329,7 +329,7 @@ fn macro_expand_with_arg(
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return ExpandResult {
|
return ExpandResult {
|
||||||
value: Some(eager.expansion.clone()),
|
value: Some(eager.arg_or_expansion.clone()),
|
||||||
// FIXME: There could be errors here!
|
// FIXME: There could be errors here!
|
||||||
err: None,
|
err: None,
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,7 +122,7 @@ pub fn expand_eager_macro(
|
||||||
def,
|
def,
|
||||||
krate,
|
krate,
|
||||||
eager: Some(EagerCallInfo {
|
eager: Some(EagerCallInfo {
|
||||||
expansion: Arc::new(parsed_args.clone()),
|
arg_or_expansion: Arc::new(parsed_args.clone()),
|
||||||
included_file: None,
|
included_file: None,
|
||||||
}),
|
}),
|
||||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr },
|
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: FragmentKind::Expr },
|
||||||
|
@ -149,7 +149,7 @@ pub fn expand_eager_macro(
|
||||||
def,
|
def,
|
||||||
krate,
|
krate,
|
||||||
eager: Some(EagerCallInfo {
|
eager: Some(EagerCallInfo {
|
||||||
expansion: Arc::new(expanded.subtree),
|
arg_or_expansion: Arc::new(expanded.subtree),
|
||||||
included_file: expanded.included_file,
|
included_file: expanded.included_file,
|
||||||
}),
|
}),
|
||||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment },
|
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment },
|
||||||
|
|
|
@ -231,7 +231,7 @@ pub enum MacroDefKind {
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
struct EagerCallInfo {
|
struct EagerCallInfo {
|
||||||
/// NOTE: This can be *either* the expansion result, *or* the argument to the eager macro!
|
/// 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>,
|
included_file: Option<FileId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue