-
Notifications
You must be signed in to change notification settings - Fork 13.3k
box syntax does not allow an expression? #16777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I expect it's trying to parse fn main() {
use std::owned::HEAP;
let foo = box(HEAP) (1i + 2);
} |
Ah, yes, that makes sense now. But I suggest something be done about the syntax because people will get quite confused when just using the default. |
Actually an arbitrary 'allocator' expression. Currently we only support two builtin ones, but we will likely have some form of generalisation in the future. In any case, you can choose the default via I do think we can improve the error messages here. |
Is this a dupe of #15386? I do agree that the syntax is awful and probably should be changed, but that’s probably for another issue. |
Yes, I believe this is a dupe of #15386, which also has to do with diagnostics. Thanks @P1start! |
fix: Don't invalid body query results when generating desugared names The hack remains until we get hygiene, but with this the generated names are stable across bodies
The text was updated successfully, but these errors were encountered: