Skip to content

Commit e508861

Browse files
committed
remove unnecessary build hack
with rust 1.23.0 which is stable now, this compiler stack overflow crash not occured related to rust-lang/rust#26467
1 parent 3f5922a commit e508861

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

build/main.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,8 @@ fn main() {
1515
textures::build_texture_file(&mut File::create(&dest.join("textures.rs")).unwrap());
1616
println!("cargo:rerun-if-changed=build/main.rs");
1717

18-
19-
// There is a `#[derive(Clone)]` line in the bindings that triggers a stack overflow
20-
// in rustc (https://github.com/rust-lang/rust/issues/26467).
21-
// Therefore we write the bindings to memory first, then remove this line, and then copy
22-
// to the file.
23-
let mut gl_bindings = Vec::new();
24-
generate_gl_bindings(&mut gl_bindings);
25-
let gl_bindings = String::from_utf8(gl_bindings).unwrap();
26-
let gl_bindings = gl_bindings.replace("#[derive(Clone)]", "");
2718
let mut file_output = File::create(&dest.join("gl_bindings.rs")).unwrap();
28-
file_output.write_all(&gl_bindings.into_bytes()).unwrap();
19+
generate_gl_bindings(&mut file_output);
2920
}
3021

3122
fn generate_gl_bindings<W>(dest: &mut W) where W: Write {

0 commit comments

Comments
 (0)