});
self.define(parent, name, TypeNS, (module, sp, vis));
+ if let Some(mark) = opt_mark {
+ let invocation = self.arenas.alloc_invocation_data(InvocationData {
+ module: Cell::new(module),
+ def_index: CRATE_DEF_INDEX,
+ const_integer: false,
+ legacy_scope: Cell::new(LegacyScope::Empty),
+ expansion: Cell::new(LegacyScope::Empty),
+ });
+ self.invocations.insert(mark, invocation);
+ }
+
self.populate_module_if_necessary(module);
- } else if custom_derive_crate {
+ } else {
// Define an empty module
let def = Def::Mod(self.definitions.local_def_id(item.id));
let module = ModuleS::new(Some(parent), ModuleKind::Def(def, name));