You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that parse_all_token_trees now returns a Result<Vec<TokenTree>, DiagnosticBuilder<'sess>>, and DiagnosticBuilder<'sess> has a destructor (that even uses the borrowed data!) and therefore session must be alive for the containing scope, so from a compiler POV this is a simple case of API breakage.
On the other hand:
I think the lifetime restriction is unnecessary here - after all, the Result is always consumed by the unwrap, so it is never destroyed by the caller - so we could try to have dropck be smarter about this kind of thing, but that would be low-priority
We could use better error-reporting for lifetime conflicts - currently, we unpredictably pick 2 constraints that are related to the conflict, but we throw away all other constraints without looking at them.
The below code worked until I updated today. I'm not sure which version of the nightly build I had previously, but it was about ten days old.
Rust Playpen (this produces the same error I am seeing)
If I change it to this, it compiles:
Meta
The text was updated successfully, but these errors were encountered: