explaine.rs
explaine.rs copied to clipboard
Missing Hint for Lifetime annotations
What I expected
It would be super awesome to have a hint for '
lifetime annotations, since they're non-trivial to google for when you don't know what they're called.
Source code
I hope I'm getting the terminology right here. For the example code, I used an example from https://doc.rust-lang.org/1.9.0/book/lifetimes.html
0 | struct Foo<'a> {
| /* ↑ lifetime annotation */
1 | x: &'a i32,
| /* ↑ lifetime annotation */
2 | }
FYI I've deployed half a fix for this. We now highlight some lifetime generic parameters e.g. https://jrvidal.github.io/explaine.rs/?code=struct+Foo%3C%27a%3E+%7B%0A++x%3A+%26%27a+i32%0A%7D&line=0&ch=12
ooooh nice! That's already a huge help, I think.