File tree 1 file changed +3
-16
lines changed
1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 1
1
// rustc-cfg emitted by the build script:
2
2
//
3
3
// "use_proc_macro"
4
- // Link to extern crate proc_macro. Available on any compiler and any target
5
- // except wasm32. Requires "proc-macro" Cargo cfg to be enabled (default is
6
- // enabled). On wasm32 we never link to proc_macro even if "proc-macro" cfg
7
- // is enabled.
4
+ // Link to extern crate proc_macro. Requires "proc-macro" Cargo cfg to be
5
+ // enabled (default is enabled).
8
6
//
9
7
// "wrap_proc_macro"
10
8
// Wrap types from libproc_macro rather than polyfilling the whole API.
@@ -109,8 +107,7 @@ fn main() {
109
107
println ! ( "cargo:rustc-cfg=no_source_text" ) ;
110
108
}
111
109
112
- let target = env:: var ( "TARGET" ) . unwrap ( ) ;
113
- if !enable_use_proc_macro ( & target) {
110
+ if !cfg ! ( feature = "proc-macro" ) {
114
111
return ;
115
112
}
116
113
@@ -132,16 +129,6 @@ fn main() {
132
129
}
133
130
}
134
131
135
- fn enable_use_proc_macro ( target : & str ) -> bool {
136
- // wasm targets don't have the `proc_macro` crate, disable this feature.
137
- if target. contains ( "wasm32" ) && target != "wasm32-unknown-emscripten" {
138
- return false ;
139
- }
140
-
141
- // Otherwise, only enable it if our feature is actually enabled.
142
- cfg ! ( feature = "proc-macro" )
143
- }
144
-
145
132
struct RustcVersion {
146
133
minor : u32 ,
147
134
nightly : bool ,
You can’t perform that action at this time.
0 commit comments