File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 11// rustc-cfg emitted by the build script:
22//
33// "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).
86//
97// "wrap_proc_macro"
108// Wrap types from libproc_macro rather than polyfilling the whole API.
@@ -109,8 +107,7 @@ fn main() {
109107 println ! ( "cargo:rustc-cfg=no_source_text" ) ;
110108 }
111109
112- let target = env:: var ( "TARGET" ) . unwrap ( ) ;
113- if !enable_use_proc_macro ( & target) {
110+ if !cfg ! ( feature = "proc-macro" ) {
114111 return ;
115112 }
116113
@@ -132,16 +129,6 @@ fn main() {
132129 }
133130}
134131
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-
145132struct RustcVersion {
146133 minor : u32 ,
147134 nightly : bool ,
You can’t perform that action at this time.
0 commit comments