Closed tafia closed 6 years ago
Yes, this would help, but I think it's more than I need!
I think the comments explaining what the Rust code was generated from could be quite valuable in large systems with more than a handful of generate files. The only problem that I know of is that they cannot be //!
comments. So for my purposes, simply the one-character change to write_headers
would suffice.
I'm not sure I would actually use the option to disable the headers, as long as they're just plain comments.
It is not just with the comment, it is also with all the module attributes.
If the file is in the OUT_DIR folder, one should assume that it was automatically generated. Knowing that it is from pb-rs could be done at library level by just renaming the file for instance. Of course we can also keep the comment as a regular one (not a module comment) and get rid of the attributes.
Right, //!
comments are just one special case of inner attributes in general. No inner attributes are allowed in a file you're going to include!
. So it'd have to avoid generating not just doc comments, but any other sort of module attribute. That's too bad.
Did you miss changing the MAGIC_COMMENT
too?
Did you miss changing the MAGIC_COMMENT too?
Sorry I am not sure I follow. What is this?
Sorry I wasn't more clear. The MAGIC_COMENT
const still uses //!
close #122
@jimblandy would it work for you?