-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement RFC 873: Type Macros #27296
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
Can you ad a feature gate (standard procedure)? |
@nikomatsakis yeah, I wasn't clear about how we were doing RFCs. Feature gate for one release cycle? |
("default_type_parameter_fallback", "1.3.0", Active), | ||
|
||
// Allows macros to appear in the type position. | ||
("type_macros", "1.3.0", Active) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r-
Could you add a compile-fail test for the feature gate? And maybe some more basic run-pass tests for the macros themselves? |
☔ The latest upstream changes (presumably #27382) made this pull request unmergeable. Please resolve the merge conflicts. |
d6f9311
to
2d80d63
Compare
&fld.cx.parse_sess.span_diagnostic, | ||
"type_macros", | ||
t.span, | ||
"type macros are experimental (see tracking issue: 27336)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think (see issue #27336)
is a slightly better phrasing of this.
r=me with an ERROR in the compile-fail test (and some nits). |
Reapplied the changes from https://github.com/freebroccolo/rust/commit/dc64b731d7f66c2b43d5e5e8c721be7bd3b59540 to a clean branch of master
Reapplied the changes from https://github.com/freebroccolo/rust/commit/8b07abaa6e8ab42d37656dfad89de0eb5810c3b3 to a clean branch of master
Reapplied the changes from https://github.com/freebroccolo/rust/commit/7aafe24139abc2d1f302bbb166bcaa006f12cf4d to a clean branch of master
I addressed all your comments and it should be good to go. @bors r=huonw |
📌 Commit 471370a has been approved by |
⌛ Testing commit 471370a with merge fbf5fcf... |
💔 Test failed - auto-mac-64-nopt-t |
@bors retry |
@bors r=huonw |
📌 Commit 83e43bb has been approved by |
This pull request implements the functionality for [RFC 873](https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md). This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message. @nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.
This pull request implements the functionality for RFC 873. This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message.
@nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.