3 ms·
> It will constantly suggest explicit lifetimes and other magic when in reality you probably want `Box<Rc<..>>`. If you can provide examples of cases like thes
by estebank 3y ago
> It will constantly suggest explicit lifetimes and other magic when in reality you probably want `Box<Rc<..>>`.
If you can provide examples of cases like these, please file a ticket in the issue tracker. Some suggestions have to be overly cautious in order to not lead people astray, so having examples of common (or uncommon!) things people try that could use with some "human touch" in what direction they should take instead is very useful and welcome.
- mtsr 3y agoI wonder how tractable it would be for the compiler to suggest when your API needs Rc or boxing without being just as wrong in other cases. I think now that too many lists is part of the book, maybe the compiler can link to that in some cases, hah.
- estebank 3y ago> I wonder how tractable it would be for the compiler to suggest when your API needs Rc or boxing without being just as wrong in other cases. A lot of the cases I've seen so far require some kind of global analysis, that we don't have today. But if we can have some kind of local analysis that will be reliable for a subset of cases, I'd jump at the opportunity to add it. > I think now that too many lists is part of the book, maybe the compiler can link to that in some cases, hah. That's not a bad idea, we already link to the book when it seems appropriate.