The or linked earlier (and it's predecessors) aim at documenting it, as well as teaching that 'static can mean "owned", but that later point still needs a bit of work.
-
-
I just checked and this is going to be the new outputpic.twitter.com/4gD1oeHIRc
1 reply 0 retweets 2 likes -
Replying to @ekuber
Certainly better. Now if it can just recommend a suggestion that isn't nonsense ;)
1 reply 0 retweets 0 likes -
Replying to @sgrif
Working on it. Trying things out but it'll be always a guess, because by the time we have the lifetimes we cannot tie those back to the exact part of the type.
1 reply 0 retweets 1 like -
You can get quite far with reconstructing it and infer things from context (like suggesting '_ on all dyn/impl traits) but for more complex cases we'll still have something slightly incorrect, I fear. Until we refactor the lifetime analysis to hold on to more type data for errors
1 reply 0 retweets 1 like -
Replying to @ekuber
Once the error is suggesting + '_ +'_ we should just send them to discord lol
1 reply 0 retweets 1 like -
-
-
Replying to @ekuber
\o/ It's a shame we can't disambiguate whether it needs to go on `dyn Trait` or `impl Trait` at the point where we have to render the help, but TBH since one of the suggestions is so obviously nonsense it's fine
1 reply 0 retweets 1 like -
Replying to @sgrif
I can probably still break it, but I'm happy with it:pic.twitter.com/JhtKmW5kCZ
1 reply 0 retweets 2 likes
-
-
Replying to @sgrif
It's still a guess and we could make it not guess to be accurate always, but won't give nonsensical suggestionspic.twitter.com/40MKv8eZuu
1 reply 0 retweets 8 likes -
Wow. That's an awesomely helpful message. Do any other lifetime diagnostics give suggestions like that already? That seems useful in even a far simpler case, like: fn (a: &T, b: &T) -> &T {} where you need to annotate the correct lifetimes
3 replies 0 retweets 0 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.