Commit d04eea1
committed
Fix lifetime on
I'd like to write something like this:
```rust
struct W(syn::Generics);
impl W {
pub fn as_turbofish(&self) -> syn::Turbofish<'_> {
self.0.split_for_impl().1.as_turbofish()
}
}
```
Unfortunately, that doesn't compile today and as far as I can tell it's completely unimplementable -
the lifetime of the `syn::Turbofish` ends up tied to the temporary returned by `split_for_impl`.
That seems silly and unintentional, fix it.as_turbofish
1 parent 432b303 commit d04eea1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
0 commit comments