Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/gl_generator/generators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,18 @@ pub fn gen_return_type(ecx: &ExtCtxt, cmd: &Cmd) -> P<ast::Ty> {

// ... but there is one more step: if the Rust type ends with `c_void`, we replace it with `()`
match ty.node {
// hack_in_lieu_of_rust_19387_being_merged
ast::TyPath(ref path, _ ) if path.segments.last().unwrap().identifier.as_str() == "c_void" => {
match quote_expr!(ecx, x as ()).node {
ast::ExprCast(_, ref ty) => return ty.clone(),
_ => (),
}
}
/*
ast::TyPath(ref path, _ )
if path.segments.last().unwrap().identifier.as_str() == "c_void"
=> return quote_ty!(ecx, ()),
*/
_ => ()
};

Expand Down
Loading