#[ast] attribute is not meaningful unless the type it's on is in a file which is processed by AST codegen.
Make macro raise an error/panic if the file path needs to be added to AST codegen, with an error that says what to do. This will help people do the right thing.