Skip to content

Commit

Permalink
Fix typo in needless_lifetimes test
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Sep 25, 2024
1 parent 66f1f54 commit 5c2f6db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/ui/needless_lifetimes.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ mod nested_elision_sites {
f()
}
// lint
fn where_clause_elidadable<T>(i: &i32, f: T) -> &i32
fn where_clause_elidable<T>(i: &i32, f: T) -> &i32
where
T: Fn(&i32) -> &i32,
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/needless_lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/needless_lifetimes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,15 @@ LL + fn generics_elidable<T: Fn(&i32) -> &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<T>(i: &i32, f: T) -> &i32
LL - fn where_clause_elidable<'a, T>(i: &'a i32, f: T) -> &'a i32
LL + fn where_clause_elidable<T>(i: &i32, f: T) -> &i32
|

error: the following explicit lifetimes could be elided: 'a
Expand Down

0 comments on commit 5c2f6db

Please sign in to comment.