include! should allow inner doc comments and directives #66920
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Currently,
include!
cannot include a file that contains inner doc comments (//! ...
) or directives (#![...]
). That creates a challenge when trying to generate a crate's top-level contents with a build script.See https://internals.rust-lang.org/t/include-raw-directive-for-raw-textual-inclusion-of-generated-code/11405 for discussion. @dtolnay pointed out that we can fix this backwards-compatibly, as it would just turn an error into a non-error.
The text was updated successfully, but these errors were encountered: