Fix typo in needless_lifetimes test
This commit is contained in:
parent
66f1f544af
commit
5c2f6db289
3 changed files with 7 additions and 7 deletions
|
|
@ -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,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue