Fix typo in needless_lifetimes
test
This commit is contained in:
parent
66f1f544af
commit
5c2f6db289
@ -384,7 +384,7 @@ mod nested_elision_sites {
|
|||||||
f()
|
f()
|
||||||
}
|
}
|
||||||
// lint
|
// lint
|
||||||
fn where_clause_elidadable<T>(i: &i32, f: T) -> &i32
|
fn where_clause_elidable<T>(i: &i32, f: T) -> &i32
|
||||||
where
|
where
|
||||||
T: Fn(&i32) -> &i32,
|
T: Fn(&i32) -> &i32,
|
||||||
{
|
{
|
||||||
|
@ -384,7 +384,7 @@ mod nested_elision_sites {
|
|||||||
f()
|
f()
|
||||||
}
|
}
|
||||||
// lint
|
// 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
|
where
|
||||||
T: Fn(&i32) -> &i32,
|
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
|
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
|
help: elide the lifetimes
|
||||||
|
|
|
|
||||||
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
|
||||||
LL + fn where_clause_elidadable<T>(i: &i32, f: T) -> &i32
|
LL + fn where_clause_elidable<T>(i: &i32, f: T) -> &i32
|
||||||
|
|
|
|
||||||
|
|
||||||
error: the following explicit lifetimes could be elided: 'a
|
error: the following explicit lifetimes could be elided: 'a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user