@@ -608,13 +608,13 @@ declare_lint! {
608
608
}
609
609
610
610
declare_lint ! {
611
- /// The `unfulfilled_lint_expectations` lint detects lint trigger expectations
612
- /// that have not been fulfilled .
611
+ /// The `unfulfilled_lint_expectations` lint warns if a lint expectation is
612
+ /// unfulfilled .
613
613
///
614
614
/// ### Example
615
615
///
616
616
/// ```rust
617
- /// #![feature(lint_reasons)]
617
+ /// #![cfg_attr(bootstrap, feature(lint_reasons) )]
618
618
///
619
619
/// #[expect(unused_variables)]
620
620
/// let x = 10;
@@ -625,24 +625,14 @@ declare_lint! {
625
625
///
626
626
/// ### Explanation
627
627
///
628
- /// It was expected that the marked code would emit a lint. This expectation
629
- /// has not been fulfilled.
628
+ /// The `#[expect]` attribute can be used to create a lint expectation. The
629
+ /// expectation is fulfilled, if a `#[warn]` attribute at the same location
630
+ /// would result in a lint emission. If the expectation is unfulfilled,
631
+ /// because no lint was emitted, this lint will be emitted on the attribute.
630
632
///
631
- /// The `expect` attribute can be removed if this is intended behavior otherwise
632
- /// it should be investigated why the expected lint is no longer issued.
633
- ///
634
- /// In rare cases, the expectation might be emitted at a different location than
635
- /// shown in the shown code snippet. In most cases, the `#[expect]` attribute
636
- /// works when added to the outer scope. A few lints can only be expected
637
- /// on a crate level.
638
- ///
639
- /// Part of RFC 2383. The progress is being tracked in [#54503]
640
- ///
641
- /// [#54503]: https://github.com/rust-lang/rust/issues/54503
642
633
pub UNFULFILLED_LINT_EXPECTATIONS ,
643
634
Warn ,
644
- "unfulfilled lint expectation" ,
645
- @feature_gate = rustc_span:: sym:: lint_reasons;
635
+ "unfulfilled lint expectation"
646
636
}
647
637
648
638
declare_lint ! {
0 commit comments