From d2e0c3b08171c53534dbdca6f79f3738fe029b9e Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sun, 18 Aug 2024 13:42:16 -0400 Subject: [PATCH] Fix typo in `needless_lifetimes` test --- tests/ui/needless_lifetimes.fixed | 2 +- tests/ui/needless_lifetimes.rs | 2 +- tests/ui/needless_lifetimes.stderr | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/ui/needless_lifetimes.fixed b/tests/ui/needless_lifetimes.fixed index e4bb7f86d12f..7ded5b4234cf 100644 --- a/tests/ui/needless_lifetimes.fixed +++ b/tests/ui/needless_lifetimes.fixed @@ -384,7 +384,7 @@ mod nested_elision_sites { f() } // lint - fn where_clause_elidadable(i: &i32, f: T) -> &i32 + fn where_clause_elidable(i: &i32, f: T) -> &i32 where T: Fn(&i32) -> &i32, { diff --git a/tests/ui/needless_lifetimes.rs b/tests/ui/needless_lifetimes.rs index 03d6f2013586..8b3a885f4a35 100644 --- a/tests/ui/needless_lifetimes.rs +++ b/tests/ui/needless_lifetimes.rs @@ -384,7 +384,7 @@ mod nested_elision_sites { f() } // lint - fn where_clause_elidadable<'a, T>(i: &'a i32, f: T) -> &'a i32 + fn where_clause_elidable<'a, T>(i: &'a i32, f: T) -> &'a i32 where T: Fn(&i32) -> &i32, { diff --git a/tests/ui/needless_lifetimes.stderr b/tests/ui/needless_lifetimes.stderr index 69686907f7c4..d6a0443d78ce 100644 --- a/tests/ui/needless_lifetimes.stderr +++ b/tests/ui/needless_lifetimes.stderr @@ -373,15 +373,15 @@ LL + fn generics_elidable &i32>(i: &i32, f: T) -> &i32 { | error: the following explicit lifetimes could be elided: 'a - --> tests/ui/needless_lifetimes.rs:387:32 + --> tests/ui/needless_lifetimes.rs:387:30 | -LL | fn where_clause_elidadable<'a, T>(i: &'a i32, f: T) -> &'a i32 - | ^^ ^^ ^^ +LL | fn where_clause_elidable<'a, T>(i: &'a i32, f: T) -> &'a i32 + | ^^ ^^ ^^ | help: elide the lifetimes | -LL - fn where_clause_elidadable<'a, T>(i: &'a i32, f: T) -> &'a i32 -LL + fn where_clause_elidadable(i: &i32, f: T) -> &i32 +LL - fn where_clause_elidable<'a, T>(i: &'a i32, f: T) -> &'a i32 +LL + fn where_clause_elidable(i: &i32, f: T) -> &i32 | error: the following explicit lifetimes could be elided: 'a