@@ -1618,40 +1618,6 @@ declare_lint! {
16181618 "detects lifetime parameters that are never used"
16191619}
16201620
1621- declare_lint ! {
1622- /// The `named_static_lifetimes` lint detects lifetime parameters that are
1623- /// defined as outliving the static lifetime.
1624- ///
1625- /// ### Example
1626- ///
1627- /// ```rust,compile_fail
1628- /// #[deny(named_static_lifetimes)]
1629- ///
1630- /// pub fn foo<'a>(_s: &'a str) where 'a: 'static {}
1631- /// ```
1632- ///
1633- /// {{produces}}
1634- ///
1635- /// ### Explanation
1636- ///
1637- /// By definition, the static lifetime (`'static`) outlives every other
1638- /// lifetime. If another lifetime `'a` lives at least as long as `'static`,
1639- /// then it is identical to `'static`. In that case, there is no need for
1640- /// the name `'a`, and it likely only makes the code harder to read.
1641- ///
1642- /// To fix this, consider using `'static` instead of the named lifetime.
1643- /// Here is the result of doing that in the example above:
1644- ///
1645- /// ```rust
1646- /// #[deny(named_static_lifetimes)]
1647- ///
1648- /// pub fn foo(_s: &'static str) {}
1649- /// ```
1650- pub NAMED_STATIC_LIFETIMES ,
1651- Warn ,
1652- "detects lifetime parameters that are identical to `'static`"
1653- }
1654-
16551621declare_lint ! {
16561622 /// The `tyvar_behind_raw_pointer` lint detects raw pointer to an
16571623 /// inference variable.
@@ -3309,7 +3275,6 @@ declare_lint_pass! {
33093275 UNCONDITIONAL_RECURSION ,
33103276 SINGLE_USE_LIFETIMES ,
33113277 UNUSED_LIFETIMES ,
3312- NAMED_STATIC_LIFETIMES ,
33133278 UNUSED_LABELS ,
33143279 TYVAR_BEHIND_RAW_POINTER ,
33153280 ELIDED_LIFETIMES_IN_PATHS ,
0 commit comments