Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc should not automatically insert feature gates for testing code snippets in plain markdown files #12773

Closed
huonw opened this issue Mar 9, 2014 · 1 comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@huonw
Copy link
Member

huonw commented Mar 9, 2014

Currently running rustdoc --test foo.md will automatically insert

#[ feature(macro_rules, globs, struct_variant, managed_boxes) ];

into every snippet. This is a stopgap measure added by #12747 to easy migration from the old extract-tests.py driver to the new rustdoc --test one.

Fixing this would preferably involve removing as many of the uses of feature gated things as possible from the tutorial, manual and guides.

huonw added a commit to huonw/rust that referenced this issue Mar 9, 2014
The manual, tutorial and guides need the feature gates quite often,
unfortunately, so this is the low-cost path to migrating to use
rustdoc. This is only activated for pure-Markdown files.

Preferably this would be avoided: rust-lang#12773
@alexcrichton
Copy link
Member

triage: Our current plans are to start cracking down on #[feature] usage, and features such as the ones mentioned are all slated for inclusion into the standard stable distribution, so I'm going to close this for now. It should be noted that today rustdoc doesn't actually inject any feature-gate enablings.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
fix: Improve self param completion applicability

Fixes rust-lang/rust-analyzer#9522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants