This repository was archived by the owner on Dec 27, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,20 @@ fn main() {
103103[ demo-hack ] : https://github.com/dtolnay/proc-macro-hack/tree/master/demo-hack
104104[ example ] : https://github.com/dtolnay/proc-macro-hack/tree/master/example
105105
106+ ## Limitations
107+
108+ - Only proc macros in expression position are supported. Proc macros in type
109+ position ([ #10 ] ) or pattern position ([ #20 ] ) are not supported.
110+
111+ - By default, nested invocations are not supported i.e. the code emitted by a
112+ proc-macro-hack macro invocation cannot contain recursive calls to the same
113+ proc-macro-hack macro nor calls to any other proc-macro-hack macros. Use
114+ [ ` proc-macro-nested ` ] if you require support for nested invocations.
115+
116+ [ #10 ] : https://github.com/dtolnay/proc-macro-hack/issues/10
117+ [ #20 ] : https://github.com/dtolnay/proc-macro-hack/issues/20
118+ [ `proc-macro-nested` ] : https://docs.rs/proc-macro-nested
119+
106120<br >
107121
108122#### License
Original file line number Diff line number Diff line change 100100//! [demo-hack-impl]: https://github.com/dtolnay/proc-macro-hack/tree/master/demo-hack-impl
101101//! [demo-hack]: https://github.com/dtolnay/proc-macro-hack/tree/master/demo-hack
102102//! [example]: https://github.com/dtolnay/proc-macro-hack/tree/master/example
103+ //!
104+ //! # Limitations
105+ //!
106+ //! - Only proc macros in expression position are supported. Proc macros in type
107+ //! position ([#10]) or pattern position ([#20]) are not supported.
108+ //!
109+ //! - By default, nested invocations are not supported i.e. the code emitted by
110+ //! a proc-macro-hack macro invocation cannot contain recursive calls to the
111+ //! same proc-macro-hack macro nor calls to any other proc-macro-hack macros.
112+ //! Use [`proc-macro-nested`] if you require support for nested invocations.
113+ //!
114+ //! [#10]: https://github.com/dtolnay/proc-macro-hack/issues/10
115+ //! [#20]: https://github.com/dtolnay/proc-macro-hack/issues/20
116+ //! [`proc-macro-nested`]: https://docs.rs/proc-macro-nested
103117
104118#![ recursion_limit = "512" ]
105119#![ cfg_attr( feature = "cargo-clippy" , allow( renamed_and_removed_lints) ) ]
You can’t perform that action at this time.
0 commit comments