Correct detection of elided lifetimes in impl-trait.

This commit is contained in:
Camille GILLOT 2023-01-05 17:57:55 +00:00
parent 1d284af117
commit de1859fc32
2 changed files with 9 additions and 2 deletions

View file

@ -60,4 +60,9 @@ mod in_path {
//~| ERROR missing lifetime specifier
}
// This must not err, as the `&` actually resolves to `'a`.
fn resolved_anonymous<'a, T>(f: impl Fn(&'a str) -> &T) {
f("f")
}
fn main() {}