Lines Matching defs:proc_macro
9 //! A wrapper around the procedural macro API of the compiler's [`proc_macro`]
12 //! [`proc_macro`]: https://doc.rust-lang.org/proc_macro/
15 //! main.rs.** Types from `proc_macro` are entirely specific to procedural
19 //! `proc_macro2` rather than `proc_macro`, the procedural macro ecosystem
24 //! specific to procedural macros, nothing that uses `proc_macro` can be
37 //! extern crate proc_macro;
43 //! pub fn my_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
51 //! proc_macro::TokenStream::from(output)
63 //! compiler API. Functionality in `proc_macro` that is not yet stable is not
137 extern crate proc_macro;
182 /// Token stream is both the input and output of `#[proc_macro]`,
252 impl From<proc_macro::TokenStream> for TokenStream {
253 fn from(inner: proc_macro::TokenStream) -> Self {
260 impl From<TokenStream> for proc_macro::TokenStream {
444 /// Convert `proc_macro2::Span` to `proc_macro::Span`.
452 /// `proc_macro2::Span`, the `proc_macro::Span` type can only exist within
455 pub fn unwrap(self) -> proc_macro::Span {
462 pub fn unstable(self) -> proc_macro::Span {
509 /// Warning: the underlying [`proc_macro::Span::join`] method is
513 /// [`proc_macro::Span::join`]: https://doc.rust-lang.org/proc_macro/struct.Span.html#method.join
1238 /// Warning: the underlying [`proc_macro::Literal::subspan`] method is
1242 /// [`proc_macro::Literal::subspan`]: https://doc.rust-lang.org/proc_macro/struct.Literal.html#method.subspan