File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
compiler/rustc_lint_defs/src Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -3059,3 +3059,30 @@ declare_lint! {
3059
3059
Allow ,
3060
3060
"No declared ABI for extern declaration"
3061
3061
}
3062
+
3063
+ declare_lint ! {
3064
+ /// The `invalid_doc_attributes` lint detects when the `#[doc(...)]` is
3065
+ /// misused.
3066
+ ///
3067
+ /// ### Example
3068
+ ///
3069
+ /// ```rust,compile_fail
3070
+ /// #![deny(warnings)]
3071
+ /// #[doc(test(no_crate_inject))]
3072
+ /// ```
3073
+ ///
3074
+ /// {{produces}}
3075
+ ///
3076
+ /// ### Explanation
3077
+ ///
3078
+ /// Previously, there were very like checks being performed on `#[doc(..)]`
3079
+ /// unlike the other attributes. It'll now catch all the issues that it
3080
+ /// silently ignored previously.
3081
+ pub INVALID_DOC_ATTRIBUTE ,
3082
+ Warn ,
3083
+ "detects invalid `#[doc(...)]` attributes" ,
3084
+ @future_incompatible = FutureIncompatibleInfo {
3085
+ reference: "issue #82730 <https://github.com/rust-lang/rust/issues/82730>" ,
3086
+ edition: Some ( Edition :: Edition2021 ) ,
3087
+ } ;
3088
+ }
You can’t perform that action at this time.
0 commit comments