mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
Fix typo in needless_lifetimes
test
This commit is contained in:
parent
66f1f544af
commit
5c2f6db289
@ -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…
Reference in New Issue
Block a user