diff --git a/crates/stackable-versioned-macros/src/codegen/module.rs b/crates/stackable-versioned-macros/src/codegen/module.rs index a66ea689..c801de4a 100644 --- a/crates/stackable-versioned-macros/src/codegen/module.rs +++ b/crates/stackable-versioned-macros/src/codegen/module.rs @@ -108,7 +108,14 @@ impl Module { ), } } - _ => continue, + // NOTE (@NickLarsenNZ): We throw an error here so the developer isn't surprised when items they have + // defined in the module are no longer accessible (because they are not re-emitted). + disallowed_item => errors.push( + Error::custom( + "Item not allowed here. Please move it ouside of the versioned module", + ) + .with_span(&disallowed_item), + ), }; }