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 1
1
// rustc-cfg emitted by the build script:
2
2
//
3
- // "use_proc_macro"
4
- // Link to extern crate proc_macro. Requires "proc-macro" Cargo cfg to be
5
- // enabled (default is enabled).
6
- //
7
3
// "wrap_proc_macro"
8
4
// Wrap types from libproc_macro rather than polyfilling the whole API.
9
5
// Enabled on rustc 1.29+ as long as procmacro2_semver_exempt is not set,
@@ -111,8 +107,6 @@ fn main() {
111
107
return ;
112
108
}
113
109
114
- println ! ( "cargo:rustc-cfg=use_proc_macro" ) ;
115
-
116
110
if version. nightly || !semver_exempt {
117
111
println ! ( "cargo:rustc-cfg=wrap_proc_macro" ) ;
118
112
}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ impl Debug for TokenStream {
233
233
}
234
234
}
235
235
236
- #[ cfg( use_proc_macro ) ]
236
+ #[ cfg( feature = "proc-macro" ) ]
237
237
impl From < proc_macro:: TokenStream > for TokenStream {
238
238
fn from ( inner : proc_macro:: TokenStream ) -> Self {
239
239
inner
@@ -243,7 +243,7 @@ impl From<proc_macro::TokenStream> for TokenStream {
243
243
}
244
244
}
245
245
246
- #[ cfg( use_proc_macro ) ]
246
+ #[ cfg( feature = "proc-macro" ) ]
247
247
impl From < TokenStream > for proc_macro:: TokenStream {
248
248
fn from ( inner : TokenStream ) -> Self {
249
249
inner
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ compile_error! {"\
120
120
build script as well.
121
121
" }
122
122
123
- #[ cfg( use_proc_macro ) ]
123
+ #[ cfg( feature = "proc-macro" ) ]
124
124
extern crate proc_macro;
125
125
126
126
mod marker;
@@ -236,14 +236,14 @@ impl FromStr for TokenStream {
236
236
}
237
237
}
238
238
239
- #[ cfg( use_proc_macro ) ]
239
+ #[ cfg( feature = "proc-macro" ) ]
240
240
impl From < proc_macro:: TokenStream > for TokenStream {
241
241
fn from ( inner : proc_macro:: TokenStream ) -> Self {
242
242
TokenStream :: _new ( inner. into ( ) )
243
243
}
244
244
}
245
245
246
- #[ cfg( use_proc_macro ) ]
246
+ #[ cfg( feature = "proc-macro" ) ]
247
247
impl From < TokenStream > for proc_macro:: TokenStream {
248
248
fn from ( inner : TokenStream ) -> Self {
249
249
inner. inner . into ( )
You can’t perform that action at this time.
0 commit comments