builtin_macros: Make #[derive(A, B, ...)] cfg-eval its input only for A, B, ...
This commit is contained in:
parent
f06f9bbd3a
commit
c993984e4d
2 changed files with 48 additions and 4 deletions
|
@ -26,7 +26,7 @@ impl MultiItemModifier for Expander {
|
|||
return ExpandResult::Ready(vec![item]);
|
||||
}
|
||||
|
||||
let item = cfg_eval(ecx, item);
|
||||
let configured_item = cfg_eval(ecx, item.clone());
|
||||
|
||||
let result =
|
||||
ecx.resolver.resolve_derives(ecx.current_expansion.id, ecx.force_mode, &|| {
|
||||
|
@ -56,7 +56,7 @@ impl MultiItemModifier for Expander {
|
|||
report_path_args(sess, &meta);
|
||||
meta.path
|
||||
})
|
||||
.map(|path| (path, item.clone(), None))
|
||||
.map(|path| (path, configured_item.clone(), None))
|
||||
.collect()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue