Non-sensical Compiler Suggested Fix

I ran into this trying things in the playground. It returns a non sensical suggested fix. Did a quick search and didn't find anything. Is this known bug or should I file an issue?

Compiling playground v0.0.1 (/playground)
error[E0106]: missing lifetime specifier
  --> src/
12 |     type Item = Foo<R>;
   |                     ^ expected named lifetime parameter
help: consider introducing a named lifetime parameter
12 |     type Item<'a> = Foo<<'a>R>;
   |              ^^^^       ^^^^


I'd file an issue with a minimal reproducible example personally. I don't know what the correct behavior is, but it's certainly not that.

Done Link

Though nightly does have a suggestion with valid syntax, which leads to GATs

I was pretty sure I had fixed this recently and indeed it is fixed in nightly:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.