File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 11// rustc-cfg emitted by the build script:
22//
3- // "use_proc_macro"
4- // Link to extern crate proc_macro. Requires "proc-macro" Cargo cfg to be
5- // enabled (default is enabled).
6- //
73// "wrap_proc_macro"
84// Wrap types from libproc_macro rather than polyfilling the whole API.
95// Enabled on rustc 1.29+ as long as procmacro2_semver_exempt is not set,
@@ -111,8 +107,6 @@ fn main() {
111107 return ;
112108 }
113109
114- println ! ( "cargo:rustc-cfg=use_proc_macro" ) ;
115-
116110 if version. nightly || !semver_exempt {
117111 println ! ( "cargo:rustc-cfg=wrap_proc_macro" ) ;
118112 }
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ impl Debug for TokenStream {
233233 }
234234}
235235
236- #[ cfg( use_proc_macro ) ]
236+ #[ cfg( feature = "proc-macro" ) ]
237237impl From < proc_macro:: TokenStream > for TokenStream {
238238 fn from ( inner : proc_macro:: TokenStream ) -> Self {
239239 inner
@@ -243,7 +243,7 @@ impl From<proc_macro::TokenStream> for TokenStream {
243243 }
244244}
245245
246- #[ cfg( use_proc_macro ) ]
246+ #[ cfg( feature = "proc-macro" ) ]
247247impl From < TokenStream > for proc_macro:: TokenStream {
248248 fn from ( inner : TokenStream ) -> Self {
249249 inner
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ compile_error! {"\
120120 build script as well.
121121" }
122122
123- #[ cfg( use_proc_macro ) ]
123+ #[ cfg( feature = "proc-macro" ) ]
124124extern crate proc_macro;
125125
126126mod marker;
@@ -236,14 +236,14 @@ impl FromStr for TokenStream {
236236 }
237237}
238238
239- #[ cfg( use_proc_macro ) ]
239+ #[ cfg( feature = "proc-macro" ) ]
240240impl From < proc_macro:: TokenStream > for TokenStream {
241241 fn from ( inner : proc_macro:: TokenStream ) -> Self {
242242 TokenStream :: _new ( inner. into ( ) )
243243 }
244244}
245245
246- #[ cfg( use_proc_macro ) ]
246+ #[ cfg( feature = "proc-macro" ) ]
247247impl From < TokenStream > for proc_macro:: TokenStream {
248248 fn from ( inner : TokenStream ) -> Self {
249249 inner. inner . into ( )
You can’t perform that action at this time.
0 commit comments