You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It currently used `span.is_empty()` for the `is_anon_in_path` cases, and
also adjusts the spans when they are non-empty. All this is very hard to
understand.
XXX
- New `Option<AngleBracket>` type makes things much clearer.
- Simpler spans in `maybe_insert_elided_lifetimes_in_path`. They're now
all empty, and point to the lifetime insertion point. `suggestion` no
longer has to call `shrink_to_hi` on any spans.
- `make_suggestion` closure now just calls `Lifetime::suggestion`,
because it's doing the same thing
Finally, some error messages are improved. First, on the `Path` case, we
have this diff:
LL | fn f(_: impl Foo) {}
- | ^^^ expected named lifetime parameter
+ | ^ expected named lifetime parameter
The carets now point to where the named lifetime parameter must be
inserted, as per the subsequent suggestion:
LL | fn f<'a>(_: impl Foo<'a>) {}
| ++++ ++++
Similar story on this diff on the `Path<>` case:
LL | fn f(_: impl Foo<>) {}
- | ^ expected named lifetime parameter
+ | ^ expected named lifetime parameter
Plus we print the `Path<>` suggestion properly:
-LL | fn f<'a>(_: impl Foo<<'a>>) {}
- | ++++ ++++
+LL | fn f<'a>(_: impl Foo<'a>) {}
+ | ++++ ++
0 commit comments