@@ -8,8 +8,6 @@ use std::process::Command;
8
8
9
9
mod remove_function;
10
10
11
- //use remove_function::remove_function_body;
12
-
13
11
struct Mod < ' a > {
14
12
pub_prefix : & ' a str ,
15
13
explicit_path : Option < & ' a str > ,
@@ -130,15 +128,11 @@ fn put_module_in_string(
130
128
} ) ?;
131
129
let mut mod_state = ModState :: default ( ) ;
132
130
for line in src. lines ( ) {
133
- //println!("mod State: {:#?}", mod_state);
134
131
if let Some ( m) = is_external_mod ( & mut mod_state, line) {
135
132
if expand_cnt == 0 {
136
133
continue ;
137
134
} ;
138
135
let rr = 10000 ;
139
- // if m.name == "try_trait" || m.name == "unsize" {
140
- // continue;
141
- //}
142
136
expand_cnt -= 1 ;
143
137
println ! ( "{} mod found: {}" , ">" . repeat( depth) , line) ;
144
138
output. push_line ( & format ! ( "{}mod {} {{" , m. pub_prefix, m. name) ) ;
@@ -187,12 +181,13 @@ fn main() {
187
181
. stdout ;
188
182
let sysroot = std:: str:: from_utf8 ( & rustc_result) . expect ( "rustc output wasn't utf8" ) ;
189
183
for what in & [ "std" , "alloc" , "core" ] {
190
- let path_string = & format ! ( "{}/lib/rustlib/src/rust/library/{}/src/lib.rs" , sysroot. trim( ) , what) ;
184
+ let path_string =
185
+ & format ! ( "{}/lib/rustlib/src/rust/library/{}/src/lib.rs" , sysroot. trim( ) , what) ;
191
186
let path = Path :: new ( & path_string) ;
192
187
let output_path = format ! ( "../www/fake_{}.rs" , what) ;
193
188
let mut output = String :: default ( ) ;
194
189
put_module_in_string ( & mut output, path, 0 , 4000 ) . unwrap ( ) ;
195
- //output = remove_function_body(&output);
190
+ //FIXME: add it when ready: output = remove_function_body(&output);
196
191
fs:: write ( output_path, output. clone ( ) ) . unwrap ( ) ;
197
192
}
198
193
}
0 commit comments