@@ -1618,40 +1618,6 @@ declare_lint! {
1618
1618
"detects lifetime parameters that are never used"
1619
1619
}
1620
1620
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
-
1655
1621
declare_lint ! {
1656
1622
/// The `tyvar_behind_raw_pointer` lint detects raw pointer to an
1657
1623
/// inference variable.
@@ -3309,7 +3275,6 @@ declare_lint_pass! {
3309
3275
UNCONDITIONAL_RECURSION ,
3310
3276
SINGLE_USE_LIFETIMES ,
3311
3277
UNUSED_LIFETIMES ,
3312
- NAMED_STATIC_LIFETIMES ,
3313
3278
UNUSED_LABELS ,
3314
3279
TYVAR_BEHIND_RAW_POINTER ,
3315
3280
ELIDED_LIFETIMES_IN_PATHS ,
0 commit comments