Allow concat_idents! in type positions as well as in expression positions#33735
Conversation
src/libsyntax_ext/concat_idents.rs
Outdated
There was a problem hiding this comment.
looks like you didn't use the Spanned type after all. (travis fails because it's unused)
e6e0d5e to
e992794
Compare
|
Would this allow me to change this macro for example to only take macro_rules! DECLARE_HANDLE {
($name:ident, $inner:ident) => {
pub enum $inner { }
pub type $name = *mut $inner;
};
} |
|
@retep998 I think it would be a good idea to allow macro invocations in the However, that would require an RFC. Also, I believe it has been suggested that we instead implement "early-phase" macros invoked with In the meantime, we could write a third party syntax extension This would allow you to change the macro to only take macro_rules! DECLARE_HANDLE {
($name:ident) => {
with_concat_idents!($name, __, |inner| {
pub enum inner { }
pub type $name = *mut inner;
});
}
} |
|
@bors: r+ |
|
📌 Commit e992794 has been approved by |
|
⌛ Testing commit e992794 with merge 213c773... |
|
@bors: retry force clean |
|
⌛ Testing commit e992794 with merge 72db775... |
|
@bors: retry force clean |
Allow `concat_idents!` in type positions as well as in expression positions This allows the `concat_idents!` macro in type positions as well as in expression positions. r? @nrc
This allows the
concat_idents!macro in type positions as well as in expression positions.r? @nrc