-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Update unstable lint docs to include required feature attributes #135406
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BoxyUwU (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@bors r+ rollup |
@@ -4033,6 +4035,7 @@ declare_lint! { | |||
/// ### Example | |||
/// | |||
/// ```rust | |||
/// #![feature(test_unstable_lint)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this one is intentionally meant to exercise the lint in question...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please remove this attribute, and instead leave a comment saying that this lint is simply meant to test the compiler's behavior when an unstable lint is enabled without the corresponding feature gate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sure
@bors r- |
@bors r+ rollup |
…s, r=compiler-errors Update unstable lint docs to include required feature attributes closes rust-lang#135298 ## Summary This PR updates the documentation examples for the following unstable lints to ensure they include the necessary feature attributes for proper usage: - fuzzy_provenance_casts - lossy_provenance_casts - unqualified_local_imports - test_unstable_lint ## Changes Made: - Added the appropriate #![feature(...)] attributes to the example code for each lint. - Updated the examples to produce correct and meaningful warnings, ensuring they align with current lint behavior. Reference: - Used the `must_not_suspend` lint documentation as a template for these updates.
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#135348 (rustdoc-json: Include items in stripped modules in `Crate::paths`.) - rust-lang#135365 (Update the explanation for why we use box_new in vec!) - rust-lang#135383 (De-abstract tagged ptr and make it covariant) - rust-lang#135401 (Remove some empty expected files to fix blessing) - rust-lang#135406 (Update unstable lint docs to include required feature attributes) - rust-lang#135407 (Deny various clippy lints) - rust-lang#135411 (run_make_support: add `#![warn(unreachable_pub)]`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135406 - Aditya-PS-05:fix/unstable-lint-docs, r=compiler-errors Update unstable lint docs to include required feature attributes closes rust-lang#135298 ## Summary This PR updates the documentation examples for the following unstable lints to ensure they include the necessary feature attributes for proper usage: - fuzzy_provenance_casts - lossy_provenance_casts - unqualified_local_imports - test_unstable_lint ## Changes Made: - Added the appropriate #![feature(...)] attributes to the example code for each lint. - Updated the examples to produce correct and meaningful warnings, ensuring they align with current lint behavior. Reference: - Used the `must_not_suspend` lint documentation as a template for these updates.
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#135348 (rustdoc-json: Include items in stripped modules in `Crate::paths`.) - rust-lang#135365 (Update the explanation for why we use box_new in vec!) - rust-lang#135383 (De-abstract tagged ptr and make it covariant) - rust-lang#135401 (Remove some empty expected files to fix blessing) - rust-lang#135406 (Update unstable lint docs to include required feature attributes) - rust-lang#135407 (Deny various clippy lints) - rust-lang#135411 (run_make_support: add `#![warn(unreachable_pub)]`) r? `@ghost` `@rustbot` modify labels: rollup
closes #135298
Summary
This PR updates the documentation examples for the following unstable lints to ensure they include the necessary feature attributes for proper usage:
Changes Made:
Reference:
must_not_suspend
lint documentation as a template for these updates.