Skip to content

Commit

Permalink
Rollup merge of rust-lang#129207 - GrigorenkoPV:elided-is-named, r=cj…
Browse files Browse the repository at this point in the history
…gillot

Lint that warns when an elided lifetime ends up being a named lifetime

As suggested in rust-lang#48686 (comment)

Fixes rust-lang#48686
  • Loading branch information
matthiaskrgr authored Sep 1, 2024
2 parents 68e6537 + 0402bb1 commit 60f37e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,7 @@ impl<'b> Pattern for &'b String {
}

#[inline]
fn strip_suffix_of<'a>(self, haystack: &'a str) -> Option<&str>
fn strip_suffix_of<'a>(self, haystack: &'a str) -> Option<&'a str>
where
Self::Searcher<'a>: core::str::pattern::ReverseSearcher<'a>,
{
Expand Down
20 changes: 10 additions & 10 deletions core/src/fmt/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,43 +110,43 @@ impl<'a> Argument<'a> {
}

#[inline(always)]
pub fn new_display<'b, T: Display>(x: &'b T) -> Argument<'_> {
pub fn new_display<'b, T: Display>(x: &'b T) -> Argument<'b> {
Self::new(x, Display::fmt)
}
#[inline(always)]
pub fn new_debug<'b, T: Debug>(x: &'b T) -> Argument<'_> {
pub fn new_debug<'b, T: Debug>(x: &'b T) -> Argument<'b> {
Self::new(x, Debug::fmt)
}
#[inline(always)]
pub fn new_debug_noop<'b, T: Debug>(x: &'b T) -> Argument<'_> {
pub fn new_debug_noop<'b, T: Debug>(x: &'b T) -> Argument<'b> {
Self::new(x, |_, _| Ok(()))
}
#[inline(always)]
pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'_> {
pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'b> {
Self::new(x, Octal::fmt)
}
#[inline(always)]
pub fn new_lower_hex<'b, T: LowerHex>(x: &'b T) -> Argument<'_> {
pub fn new_lower_hex<'b, T: LowerHex>(x: &'b T) -> Argument<'b> {
Self::new(x, LowerHex::fmt)
}
#[inline(always)]
pub fn new_upper_hex<'b, T: UpperHex>(x: &'b T) -> Argument<'_> {
pub fn new_upper_hex<'b, T: UpperHex>(x: &'b T) -> Argument<'b> {
Self::new(x, UpperHex::fmt)
}
#[inline(always)]
pub fn new_pointer<'b, T: Pointer>(x: &'b T) -> Argument<'_> {
pub fn new_pointer<'b, T: Pointer>(x: &'b T) -> Argument<'b> {
Self::new(x, Pointer::fmt)
}
#[inline(always)]
pub fn new_binary<'b, T: Binary>(x: &'b T) -> Argument<'_> {
pub fn new_binary<'b, T: Binary>(x: &'b T) -> Argument<'b> {
Self::new(x, Binary::fmt)
}
#[inline(always)]
pub fn new_lower_exp<'b, T: LowerExp>(x: &'b T) -> Argument<'_> {
pub fn new_lower_exp<'b, T: LowerExp>(x: &'b T) -> Argument<'b> {
Self::new(x, LowerExp::fmt)
}
#[inline(always)]
pub fn new_upper_exp<'b, T: UpperExp>(x: &'b T) -> Argument<'_> {
pub fn new_upper_exp<'b, T: UpperExp>(x: &'b T) -> Argument<'b> {
Self::new(x, UpperExp::fmt)
}
#[inline(always)]
Expand Down

0 comments on commit 60f37e4

Please sign in to comment.