proc_macro
source link: https://doc.rust-lang.org/proc_macro/fn.is_available.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Function proc_macro::is_available1.57.0[−][src]
pub fn is_available() -> bool
Determines whether proc_macro has been made accessible to the currently running program.
The proc_macro crate is only intended for use inside the implementation of procedural macros. All the functions in this crate panic if invoked from outside of a procedural macro, such as from a build script or unit test or ordinary Rust binary.
With consideration for Rust libraries that are designed to support both
macro and non-macro use cases, proc_macro::is_available()
provides a
non-panicking way to detect whether the infrastructure required to use the
API of proc_macro is presently available. Returns true if invoked from
inside of a procedural macro, false if invoked from any other binary.
Recommend
-
43
Recently, the procedural macro interface was somewhat stabilized. OK, there’s still the unstable proc_macro_hygiene feature you have to activate, but at least the registrar and ru...
-
7
17 January 2019proc-macro-rules I'm announcing a new library for procedural macro authors: proc-macro-rules (and on
-
6
An Incomplete Explanation of the Proc Macro That Saved Me 4000 Lines of Rust Recently I’ve been working on a...
-
20
Copy link Member dtolnay commente...
-
14
Conversation Copy link
-
2
Copy link Member carols10cents co...
-
7
Conversation Copy link Contributor...
-
4
Copy link Member ...
-
5
Contributor
-
2
Contributor ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK