diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-02 11:30:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-02 11:30:49 +0100 |
commit | fb8fb65131c8d3e6335efd401e4e83287be49357 (patch) | |
tree | 9b82278d8f204a012a1e115f92b252c7c6150e15 /crates/ra_syntax/src/ast | |
parent | 75bc0249463b72971200e482d69dad88d4e76ae3 (diff) | |
parent | edf0b4c1528407d5077220191e601ac41f790b99 (diff) |
Merge #4234
4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng
This PR implements `#[macro_export(local_inner_macros)]` support.
Note that the rustc implementation is quite [hacky][1] too. :)
[1]: https://github.com/rust-lang/rust/blob/614f273e9388ddd7804d5cbc80b8865068a3744e/src/librustc_resolve/macros.rs#L456
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 45e3dd2d3..528c873e0 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -423,6 +423,10 @@ impl ast::MacroCall { | |||
423 | None | 423 | None |
424 | } | 424 | } |
425 | } | 425 | } |
426 | |||
427 | pub fn is_bang(&self) -> bool { | ||
428 | self.is_macro_rules().is_none() | ||
429 | } | ||
426 | } | 430 | } |
427 | 431 | ||
428 | impl ast::LifetimeParam { | 432 | impl ast::LifetimeParam { |